|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.services.crypto.provider.JavaCrypt
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.
Field Summary | |
static java.lang.String |
DEFAULT_CIPHER
The default cipher |
Constructor Summary | |
JavaCrypt()
C'tor |
Method Summary | |
java.lang.String |
encrypt(java.lang.String value)
encrypt the supplied string with the requested cipher |
void |
setCipher(java.lang.String cipher)
Setting the actual cipher requested. |
void |
setSeed(java.lang.String seed)
This class never uses a seed, so this is just a dummy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_CIPHER
Constructor Detail |
public JavaCrypt()
Method Detail |
public void setCipher(java.lang.String cipher)
setCipher
in interface CryptoAlgorithm
cipher
- The cipher to use.public void setSeed(java.lang.String seed)
setSeed
in interface CryptoAlgorithm
seed
- Seed (ignored)public java.lang.String encrypt(java.lang.String value) throws java.lang.Exception
encrypt
in interface CryptoAlgorithm
value
- The value to be encrypted
java.lang.Exception
- An Exception of the underlying implementation.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |