org.apache.commons.vfs.util
Class DefaultCryptor
java.lang.Object
org.apache.commons.vfs.util.DefaultCryptor
- All Implemented Interfaces:
- Cryptor
public class DefaultCryptor
- extends Object
- implements Cryptor
Allows passwords to be encrypted and decrypted.
- Author:
- Commons VFS team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCryptor
public DefaultCryptor()
encrypt
public String encrypt(String plainKey)
throws Exception
- Encrypt the plain text password.
- Specified by:
encrypt
in interface Cryptor
- Parameters:
plainKey
- The password.
- Returns:
- The encrypted password String.
- Throws:
Exception
- If an error occurs.
decrypt
public String decrypt(String encryptedKey)
throws Exception
- Decrypts the password.
- Specified by:
decrypt
in interface Cryptor
- Parameters:
encryptedKey
- the encrypted password.
- Returns:
- The plain text password.
- Throws:
Exception
- If an error occurs.
Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.