|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.plumtree.openfoundation.security.XPRC2Crypto
public class XPRC2Crypto
XPRC2Crypto encrypts text using RC2-40 with a maximum password length of 128 characters, and decrypts text encrypted with this method or with an older Plumtree legacy cipher. This class is compatible with PTCipherUtility. Does not currently support generation or use of byte[] keys.
| Field Summary | |
|---|---|
static char |
RC2_ENCRYPTION_MARKER_40
40-bit RC2 encryption marker. |
| Constructor Summary | |
|---|---|
XPRC2Crypto()
Creates a new XPCrypto object. |
|
| Method Summary | |
|---|---|
boolean |
CanDecrypt(java.lang.String toDecrypt)
True if recognized as a possible ciphertext compatible with this cryptographic engine. |
java.lang.String |
Decrypt(java.lang.String toDecrypt,
byte[] key)
Not implemented in this version, use the Encrypt/Decrypt methods taking a String key. |
java.lang.String |
Decrypt(java.lang.String strToDecrypt,
java.lang.String strKey)
Decrypts the string with the key. |
java.lang.String |
Encrypt(java.lang.String toEncrypt,
byte[] key)
Not implemented in this version, use the Encrypt/Decrypt methods taking a String key. |
java.lang.String |
Encrypt(java.lang.String strToEncrypt,
java.lang.String strKey)
Encrypts a string, based on the key. |
byte[] |
GenerateKey()
Not implemented in this version, use the Encrypt/Decrypt methods taking a String key. |
static void |
main(java.lang.String[] args)
Tests basic encryption and decryption functionality. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char RC2_ENCRYPTION_MARKER_40
| Constructor Detail |
|---|
public XPRC2Crypto()
| Method Detail |
|---|
public java.lang.String Encrypt(java.lang.String strToEncrypt,
java.lang.String strKey)
Encrypt in interface IXPCryptostrToEncrypt - the string to be encryptedstrKey - the encryption key
public java.lang.String Decrypt(java.lang.String strToDecrypt,
java.lang.String strKey)
Decrypt in interface IXPCryptostrToDecrypt - string to be decryptedstrKey - key, need to match the encryption key
public static void main(java.lang.String[] args)
args - input arguments passed to main method.public boolean CanDecrypt(java.lang.String toDecrypt)
CanDecrypt in interface IXPCryptotoDecrypt - an encrypted string
public java.lang.String Decrypt(java.lang.String toDecrypt,
byte[] key)
Decrypt in interface IXPCryptotoDecrypt - the data to decryptkey - the key to use to decrypt the data
public java.lang.String Encrypt(java.lang.String toEncrypt,
byte[] key)
Encrypt in interface IXPCryptotoEncrypt - the data to encryptkey - the key to use to encrypt the data
public byte[] GenerateKey()
GenerateKey in interface IXPCrypto
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||