core/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java
/**
     * Decrypts the password.
     * @param encryptedKey the encrypted password.
     * @return The plain text password.
     * @throws Exception If an error occurs.
     */
Decrypts the password.
@param encryptedKey the encrypted password.
@return The plain text password.
@throws Exception If an error occurs.
Decrypts the password . @param encryptedKey the encrypted password . @return The plain text password . @throws Exception If an error occurs .
public String decrypt(String encryptedKey) throws Exception
    {
        SecretKeySpec key = new SecretKeySpec(KEY_BYTES, "AES");
        Cipher cipher = Cipher.getInstance("AES");
        cipher.init(Cipher.DECRYPT_MODE, key);
        byte[] decoded = decode(encryptedKey);
        byte[] plainText = new byte[cipher.getOutputSize(decoded.length)];
        int ptLength = cipher.update(decoded, 0, decoded.length, plainText, 0);
        ptLength += cipher.doFinal(plainText, ptLength);
        return new String(plainText).substring(0, ptLength);
    }
public String decrypt ( String encryptedKey ) throws Exception { SecretKeySpec key = new SecretKeySpec ( KEY_BYTES , "AES" ) ; Cipher cipher = Cipher . getInstance ( "AES" ) ; cipher . init ( Cipher . DECRYPT_MODE , key ) ; byte [ ] decoded = decode ( encryptedKey ) ; byte [ ] plainText = new byte [ cipher . getOutputSize ( decoded . length ) ] ; int ptLength = cipher . update ( decoded , 0 , decoded . length , plainText , 0 ) ; ptLength += cipher . doFinal ( plainText , ptLength ) ; return new String ( plainText ) . substring ( 0 , ptLength ) ; }
Decrypts the password.
Decrypts the password .