|
Compoze Software, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectportlets.compoze.groupware.util.Encryptor
This is a utility class for DES3 encryption and decryption.
Method Summary | |
java.lang.String |
decrypt(java.lang.String sValue)
Decrypts the given String |
java.lang.String |
encrypt(java.lang.String sValue)
Encrypts the gives String . |
java.lang.String |
generateKeyString()
Randomly generates a new key. |
static Encryptor |
i()
Gets an instance of the encryptor. |
void |
setKey(java.lang.String sKey)
Sets the encryption key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Encryptor i() throws GroupwareException
Encryptor
GroupwareException
- error occured while retrieving encryption keypublic void setKey(java.lang.String sKey) throws java.security.InvalidKeyException
sKey
- the encryption key
java.security.InvalidKeyException
public java.lang.String encrypt(java.lang.String sValue) throws java.security.spec.InvalidKeySpecException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, java.lang.IllegalStateException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
String
.
sValue
- the String
to encrypt
String
java.security.spec.InvalidKeySpecException
- consolidate to one exception
java.security.NoSuchAlgorithmException
- consolidate to one exception
javax.crypto.NoSuchPaddingException
- consolidate to one exception
java.security.InvalidKeyException
- consolidate to one exception
java.security.InvalidAlgorithmParameterException
- consolidate to one exception
java.lang.IllegalStateException
- consolidate to one exception
javax.crypto.IllegalBlockSizeException
- consolidate to one exception
javax.crypto.BadPaddingException
- consolidate to one exceptionpublic java.lang.String decrypt(java.lang.String sValue) throws java.security.spec.InvalidKeySpecException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, java.lang.IllegalStateException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
String
sValue
- the String
ot decrypt
String
java.security.spec.InvalidKeySpecException
- consolidate to one exception
java.security.NoSuchAlgorithmException
- consolidate to one exception
javax.crypto.NoSuchPaddingException
- consolidate to one exception
java.security.InvalidKeyException
- consolidate to one exception
java.security.InvalidAlgorithmParameterException
- consolidate to one exception
java.lang.IllegalStateException
- consolidate to one exception
javax.crypto.IllegalBlockSizeException
- consolidate to one exception
javax.crypto.BadPaddingException
- consolidate to one exceptionpublic java.lang.String generateKeyString() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
- if key generation fails
|
Compoze Software, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |