|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.common.util.crypto.PasswordChangeUtility
public class PasswordChangeUtility
Utility that allows ciphertext that was encrypted with one key to be decrypted with the old key and re-encrypted with a new key
This utility assumes that the keys have been created and verified to work correctly.
Field Summary | |
---|---|
protected boolean |
initialized
Initailization state. |
protected Cryptor |
newCryptor
The Cryptor to use for encrypting the new passwords. |
protected Cryptor |
oldCryptor
The Cryptor to use for decrypting the old passwords. |
Constructor Summary | |
---|---|
PasswordChangeUtility(java.lang.String oldkeyFileName,
java.lang.String newkeyFileName)
Construct a PasswordChangeUtility with information for two different
keys. |
Method Summary | |
---|---|
void |
init()
Initialize this factory, bound to a specific key and key entry in that store. |
java.lang.String |
newDecrypt(java.lang.String ciphertext)
Use new Cryptor to decrypt a char[]. |
java.util.Properties |
newDecrypt(java.lang.String match,
java.util.Properties props)
Use new Cryptor to decrypt properties. |
java.lang.String |
newEncrypt(java.lang.String cleartext)
Use new Cryptor to encrypt a char[]. |
java.util.Properties |
newEncrypt(java.lang.String match,
java.util.Properties props)
Use new Cryptor to encrypt properties. |
java.lang.String |
oldDecrypt(java.lang.String ciphertext)
Use old Cryptor to decrypt a char[]. |
java.util.Properties |
oldDecrypt(java.lang.String match,
java.util.Properties props)
Use old Cryptor to decrypt properties. |
java.lang.String |
oldEncrypt(java.lang.String cleartext)
Use old Cryptor to encrypt a char[]. |
java.util.Properties |
oldEncrypt(java.lang.String match,
java.util.Properties props)
Use old Cryptor to encrypt properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean initialized
protected Cryptor oldCryptor
protected Cryptor newCryptor
Constructor Detail |
---|
public PasswordChangeUtility(java.lang.String oldkeyFileName, java.lang.String newkeyFileName)
PasswordChangeUtility
with information for two different
keys.
oldkeyFileName
- The absolute path to the key with which you would like
to decrypt the old passwords.newkeyFileName
- The absolute path to the key with which you would like
to encrypt the new passwords.
IllegaArgumentException
- if any arguments are null
or empty.Method Detail |
---|
public void init() throws CryptoException
Initialize this factory, bound to a specific key and key entry in that store.
CryptoException
public java.lang.String oldEncrypt(java.lang.String cleartext) throws CryptoException
cleartext
- The cleartext that you want encrypted with the
old Cryptor.
CryptoException
- If an error occurs durring initialization
of the Cryptor or during encryption.public java.util.Properties oldEncrypt(java.lang.String match, java.util.Properties props) throws CryptoException
match
match
- props
-
CryptoException
public java.lang.String oldDecrypt(java.lang.String ciphertext) throws CryptoException
ciphertext
- The ciphertext that you want decrypted with the
old Cryptor.
CryptoException
- If an error occurs durring initialization
of the Cryptor or during decryption.public java.util.Properties oldDecrypt(java.lang.String match, java.util.Properties props) throws CryptoException
match
match
- props
-
CryptoException
public java.lang.String newEncrypt(java.lang.String cleartext) throws CryptoException
cleartext
- The cleartext that you want encrypted with the
new Cryptor.
CryptoException
- If an error occurs durring initialization
of the Cryptor or during encryption.public java.util.Properties newEncrypt(java.lang.String match, java.util.Properties props) throws CryptoException
match
match
- props
-
CryptoException
public java.lang.String newDecrypt(java.lang.String ciphertext) throws CryptoException
ciphertext
- The ciphertext that you want decrypted with the
new Cryptor.
CryptoException
- If an error occurs durring initialization
of the Cryptor or during decryption.public java.util.Properties newDecrypt(java.lang.String match, java.util.Properties props) throws CryptoException
match
match
- props
-
CryptoException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |