Package com.easydesk.crypto.provider
Class AESCrypt
java.lang.Object
com.easydesk.crypto.provider.CleanCrypt
com.easydesk.crypto.provider.AESCrypt
- All Implemented Interfaces:
CryptoAlgorithm
Implements the normal java AES/ECB/PKCS5Padding stream cipers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]byte[]decrypt(char[] value, byte[] salt, int iteration) byte[]encrypt(byte[] value, byte[] salt, int iteration) Performs the actual encryption.byte[]encrypt(char[] value, byte[] salt, int iteration) Performs the actual encryption.byte[]DOCUMENT ME!getKey(byte[] key) boolean(non-Javadoc)voidSetting the actual cipher requested.Methods inherited from class com.easydesk.crypto.provider.CleanCrypt
encrytedFullPassword, getIteration, getRandom, getSalt, isHex, isValid, isValid, setKeyLength, setSaltSize, setSeed, toBytes, toChars
-
Constructor Details
-
AESCrypt
public AESCrypt()Creates a new AESCrypt object.
-
-
Method Details
-
setCipher
Setting the actual cipher requested. If not called, then the default cipher (SHA-512) is used.- Specified by:
setCipherin interfaceCryptoAlgorithm- Overrides:
setCipherin classCleanCrypt- Parameters:
cipher- The cipher to use.
-
encrypt
Performs the actual encryption.- Specified by:
encryptin interfaceCryptoAlgorithm- Overrides:
encryptin classCleanCrypt- Parameters:
value- The value to be encryptedsalt-iteration-- Returns:
- The encrypted value
- Throws:
GeneralSecurityException- various errors from the underlying ciphers.
-
encrypt
Performs the actual encryption.- Specified by:
encryptin interfaceCryptoAlgorithm- Overrides:
encryptin classCleanCrypt- Parameters:
value- The value to be encryptedsalt-iteration- will be ignore- Returns:
- The encrypted value
- Throws:
GeneralSecurityException- various errors from the underlying ciphers.
-
decrypt
- Specified by:
decryptin interfaceCryptoAlgorithm- Overrides:
decryptin classCleanCrypt- Parameters:
value-salt-iteration-- Returns:
- Throws:
GeneralSecurityException
-
encrypt
DOCUMENT ME!- Specified by:
encryptin interfaceCryptoAlgorithm- Overrides:
encryptin classCleanCrypt- Parameters:
value- DOCUMENT ME!key- DOCUMENT ME!- Returns:
- DOCUMENT ME!
- Throws:
GeneralSecurityException- DOCUMENT ME!
-
decrypt
- Specified by:
decryptin interfaceCryptoAlgorithm- Overrides:
decryptin classCleanCrypt- Parameters:
value- the value to be decryptedkey- DOCUMENT ME!- Throws:
GeneralSecurityException
-
getKey
- Specified by:
getKeyin interfaceCryptoAlgorithm- Overrides:
getKeyin classCleanCrypt- Parameters:
key-- Returns:
- key for AES
-
isValid
Description copied from class:CleanCrypt(non-Javadoc)- Specified by:
isValidin interfaceCryptoAlgorithm- Overrides:
isValidin classCleanCrypt- Parameters:
test- the value to be testedstored- salt + ":" + digested- Returns:
- Throws:
GeneralSecurityException- See Also:
-