public class EncryptionUtil extends Object
| Constructor and Description |
|---|
EncryptionUtil(String encryptionAlgorithm,
int keySize) |
public EncryptionUtil(String encryptionAlgorithm, int keySize)
public SecretKey generateKey() throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic byte[] encrypt(byte[] data,
PublicKey publicKey,
SecretKey key)
throws Exception
Exceptionpublic byte[] decrypt(byte[] encryptedData,
KeyPair keypair,
SecretKeySpec keySpec)
throws Exception
ExceptionCopyright © 2012 JBoss Inc.. All Rights Reserved.