|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface defining a class which can be used to encrypt, decrypt, sign or verify data. The class uses public key
encryption, therefore the a different key is used for encryption & decryption. See
Method Summary | |
java.lang.String |
Decrypt(java.lang.String toDecrypt,
IXPPKIPrivateKey key)
Decrypts data which was encrypted using |
java.lang.String |
Encrypt(java.lang.String toEncrypt,
IXPPKIPublicKey key)
Encrypts data. |
IXPPKIKeyPair |
GenerateKeys(int strength,
XPSecureRandom rand)
Generates the public and private keys to use for PKI encryption. |
java.lang.String |
Sign(java.lang.String toSign,
IXPPKIPrivateKey key)
Signs the data using the supplied private key. |
java.lang.String |
VerifySignature(java.lang.String toVerify,
IXPPKIPublicKey key)
Verifies the data using the supplied public key. |
Method Detail |
public java.lang.String Encrypt(java.lang.String toEncrypt, IXPPKIPublicKey key)
toEncrypt
- the data to encryptkey
- the key to use to encrypt the data
public java.lang.String Decrypt(java.lang.String toDecrypt, IXPPKIPrivateKey key)
toDecrypt
- the data to decryptkey
- the key to use to decrypt the data
public java.lang.String Sign(java.lang.String toSign, IXPPKIPrivateKey key)
toSign
- the data to signkey
- the key to use to sign the data
public java.lang.String VerifySignature(java.lang.String toVerify, IXPPKIPublicKey key)
toVerify
- the data to verify the signature forkey
- the key to use to verify the signature
public IXPPKIKeyPair GenerateKeys(int strength, XPSecureRandom rand)
strength
- the number of bits to use in the keys (1024 is recommended)rand
- source of randomness
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |