components/ciphertool/src/main/java/org/wso2/ciphertool/CipherTool.java
private static void encryptedValue(Cipher cipher) {
        String firstPassword = Utils.getValueFromConsole("Enter Plain Text Value : ", true);
        String secondPassword = Utils.getValueFromConsole("Please Enter Value Again : ", true);

        if (!firstPassword.isEmpty() && firstPassword.equals(secondPassword)) {
            String encryptedText = doEncryption(cipher, firstPassword);
            System.out.println("\nEncrypted value is : \n" + encryptedText + "\n");
        } else {
            throw new CipherToolException("Error : Password does not match");
        }
    }
/**
     * encrypt text retrieved from Console
     *
     * @param cipher cipher
     */
encrypt text retrieved from Console

@param cipher cipher
encrypt text retrieved from Console @param cipher cipher
private static void encryptedValue(Cipher cipher) {
        String firstPassword = Utils.getValueFromConsole("Enter Plain Text Value : ", true);
        String secondPassword = Utils.getValueFromConsole("Please Enter Value Again : ", true);
        if (!firstPassword.isEmpty() && firstPassword.equals(secondPassword)) {
            String encryptedText = doEncryption(cipher, firstPassword);
            System.out.println("\nEncrypted value is : \n" + encryptedText + "\n");
        } else {
            throw new CipherToolException("Error : Password does not match");
        }
    }
private static void encryptedValue ( Cipher cipher ) { String firstPassword = Utils . getValueFromConsole ( "Enter Plain Text Value : " , true ) ; String secondPassword = Utils . getValueFromConsole ( "Please Enter Value Again : " , true ) ; if ( ! firstPassword . isEmpty ( ) && firstPassword . equals ( secondPassword ) ) { String encryptedText = doEncryption ( cipher , firstPassword ) ; System . out . println ( "\nEncrypted value is : \n" + encryptedText + "\n" ) ; } else { throw new CipherToolException ( "Error : Password does not match" ) ; } }
encrypt text retrieved from Console
encrypt text retrieved from Console