|
Enhydra-Oyster 2.1-7 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.oyster.crypto.AsymmetricEncryption
AsymmetricEncryption class is used for asymmetric encryption of the small
parts of data (for exsample to encrypt symmetric key genereted in the class
SymmetricEncryption). Performed algorithm is RSA/ECB/PKCS1Padding.
In order to create a Cipher object, the application calls the Cipher's
getInstance method, and passes the name of the requested transformation to it.
The name of a provider may be specified.
Constructor Summary | |
AsymmetricEncryption()
Default constructor |
Method Summary | |
void |
decrypt(java.security.Key key0,
byte[] forDecrypt0)
Perform RSA decryption of the input byte array with the public or private key. |
void |
encrypt(java.security.Key key0,
byte[] forEncrypt0)
Perform RSA encryption of the input byte array with the private or public key. |
byte[] |
getDecryptedValue()
Returns the decrypted value. |
byte[] |
getEncryptedValue()
Returns encrypted value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AsymmetricEncryption()
Method Detail |
public void encrypt(java.security.Key key0, byte[] forEncrypt0) throws SMIMEException
key0
- private or public keyforEncrypt0
- content for encryption
SMIMEException
- caused by non SMIMEException which can be one of
the following: NoSuchPaddingException, NoSuchProviderException,
NoSuchAlgorithmException, InvalidKeyException, BadPaddingException,
IllegalBlockSizeException.public byte[] getEncryptedValue()
public void decrypt(java.security.Key key0, byte[] forDecrypt0) throws SMIMEException
key0
- private or public keyforDecrypt0
- content for decryption
SMIMEException
- caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException.public byte[] getDecryptedValue()
|
Enhydra-Oyster 2.1-7 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |