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