Package com.easydesk.crypto.provider
Class JavaCrypt
java.lang.Object
com.easydesk.crypto.provider.CleanCrypt
com.easydesk.crypto.provider.JavaCrypt
- All Implemented Interfaces:
CryptoAlgorithm
Implements the normal java.security.MessageDigest stream cipers. Base64
strings returned by this provider are correctly padded to multiples of four
bytes. If you run into interoperability problems with other languages,
especially perl and the Digest::MD5 module, note that the md5_base64 function
from this package incorrectly drops the pad bytes. Use the MIME::Base64
package instead.
If you upgrade from Turbine 2.1 and suddently your old stored passwords no
longer work, please take a look at the OldJavaCrypt provider for bug-to-bug
compatibility.
This provider can be used as the default crypto algorithm provider.
- Version:
- $Id$
- Author:
- Henning P. Schmiedehausen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.easydesk.crypto.provider.CleanCrypt
decrypt, decrypt, encrypt, encrypt, encrypt, encrytedFullPassword, getIteration, getKey, getRandom, getSalt, isHex, isValid, isValid, isValid, setKeyLength, setSaltSize, toBytes, toChars
-
Field Details
-
DEFAULT_CIPHER
The default cipher- See Also:
-
-
Constructor Details
-
JavaCrypt
public JavaCrypt()Constructor
-
-
Method Details
-
setCipher
Setting the actual cipher requested. If not called, then the default cipher (SHA) is used. This will never throw an error even if there is no provider for this cipher. The error will be thrown by encrypt() (Fixme?)- Specified by:
setCipherin interfaceCryptoAlgorithm- Overrides:
setCipherin classCleanCrypt- Parameters:
cipher- The cipher to use.- See Also:
-
setSeed
This class never uses a seed, so this is just a dummy.- Specified by:
setSeedin interfaceCryptoAlgorithm- Overrides:
setSeedin classCleanCrypt- Parameters:
seed- Seed (ignored)- See Also:
-
encrypt
Encrypt the supplied string with the requested cipher- Parameters:
value- The value to be encrypted- Returns:
- The encrypted value
- Throws:
Exception- An Exception of the underlying implementation.- See Also:
-