|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.plumtree.openfoundation.security.XPRSACrypto
public class XPRSACrypto
Encrypts and decrypts using public key encryption with the RSA algorithm.
| Constructor Summary | |
|---|---|
XPRSACrypto()
|
|
| Method Summary | |
|---|---|
java.lang.String |
Decrypt(java.lang.String value,
IXPPKIPrivateKey key)
Decrypts the given string using RSA private-key decryption. |
java.lang.String |
Encrypt(java.lang.String value,
IXPPKIPublicKey key)
Encrypts the given string with the given key using RSA public-key encryption. |
IXPPKIKeyPair |
GenerateKeys(int strength,
XPSecureRandom rand)
Call this method to generate an RSA public-key/private-key pair. |
java.lang.String |
Sign(java.lang.String value,
IXPPKIPrivateKey key)
Signs the data in the given string with the RSA private-key. |
java.lang.String |
VerifySignature(java.lang.String value,
IXPPKIPublicKey key)
Verifies the signed text with the RSA public-key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XPRSACrypto()
| Method Detail |
|---|
public java.lang.String Encrypt(java.lang.String value,
IXPPKIPublicKey key)
Encrypt in interface IXPPKICryptovalue - string to be encryptedkey - RSA public key holding an exponent and modulus
XPIllegalArgumentException - if the input string is too large to encrypt with the current bit strength
public java.lang.String Decrypt(java.lang.String value,
IXPPKIPrivateKey key)
Decrypt in interface IXPPKICryptovalue - the string to decryptkey - RSA private key holding an exponent and modulus
public java.lang.String Sign(java.lang.String value,
IXPPKIPrivateKey key)
Sign in interface IXPPKICryptovalue - data to be signedkey - RSA private key holding an exponent and modulus
XPIllegalArgumentException - if the input string is too large to sign with the current bit strength
public java.lang.String VerifySignature(java.lang.String value,
IXPPKIPublicKey key)
VerifySignature in interface IXPPKICryptovalue - signed stringkey - RSA public key holding an exponent and modulus
public IXPPKIKeyPair GenerateKeys(int strength,
XPSecureRandom rand)
GenerateKeys in interface IXPPKICryptostrength - number of bits to userand - source of randomness
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||