@Override
    public SecurityUtilityReturnCodes handleTask(ConsoleWrapper stdin, PrintStream stdout, PrintStream stderr, String[] args) throws Exception {
        Map<String, String> argMap = parseArgumentList(args);
        if (argMap.containsKey(ARG_LIST_CUSTOM)) {
            String output = PasswordCipherUtil.listCustom();
            if (output == null) {
                output = getMessage("no.custom.encyption");
            }
            stdout.println(output);
        } else {
            String encoding = argMap.get(ARG_ENCODING);
            Map<String, String> props = convertToProperties(argMap);
            if (!!!argMap.containsKey(ARG_PASSWORD)) {
                stdout.println(encode(stderr, promptForText(stdin, stdout), encoding, props));
            } else {
                stdout.println(encode(stderr, argMap.get(ARG_PASSWORD), encoding, props));
            }
        }

        return SecurityUtilityReturnCodes.OK;
    }
@ Override public SecurityUtilityReturnCodes handleTask ( ConsoleWrapper stdin , PrintStream stdout , PrintStream stderr , String [ ] args ) throws Exception { Map < String , String > argMap = parseArgumentList ( args ) ; if ( argMap . containsKey ( ARG_LIST_CUSTOM ) ) { String output = PasswordCipherUtil . listCustom ( ) ; if ( output == null ) { output = getMessage ( "no.custom.encyption" ) ; } stdout . println ( output ) ; } else { String encoding = argMap . get ( ARG_ENCODING ) ; Map < String , String > props = convertToProperties ( argMap ) ; if ( ! ! ! argMap . containsKey ( ARG_PASSWORD ) ) { stdout . println ( encode ( stderr , promptForText ( stdin , stdout ) , encoding , props ) ) ; } else { stdout . println ( encode ( stderr , argMap . get ( ARG_PASSWORD ) , encoding , props ) ) ; } } return SecurityUtilityReturnCodes . OK ; }
{@inheritDoc}