|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eparapher.core.crypto.EPKeyManager
public class EPKeyManager
| Constructor Summary | |
|---|---|
EPKeyManager()
|
|
| Method Summary | |
|---|---|
static byte[] |
decryptWithSymetricKey(SecretKey sKey,
byte[] cipheredBits)
Decrypt with the given symetric key |
static byte[] |
encryptWithSymetricKey(SecretKey sKey,
byte[] clearbits)
Encrypt with the given symetric key |
static KeyPair |
genAsymetricKey(String algo,
int size)
Generate an asymetric key pair |
static SecretKey |
genSymetricKey(String algo,
int size)
Generate a new symetric key |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EPKeyManager()
| Method Detail |
|---|
public static SecretKey genSymetricKey(String algo,
int size)
throws NoSuchAlgorithmException,
NoSuchProviderException
algo - Algorithm namesize - Key size
NoSuchProviderException
NoSuchAlgorithmException
public static byte[] encryptWithSymetricKey(SecretKey sKey,
byte[] clearbits)
throws NoSuchAlgorithmException,
NoSuchPaddingException,
InvalidKeyException,
IllegalBlockSizeException,
BadPaddingException
sKey - the secret key used for encryptionclearBits - Data to encrypt
NoSuchPaddingException
NoSuchAlgorithmException
InvalidKeyException
BadPaddingException
IllegalBlockSizeException
public static byte[] decryptWithSymetricKey(SecretKey sKey,
byte[] cipheredBits)
throws NoSuchAlgorithmException,
NoSuchPaddingException,
InvalidKeyException,
IllegalBlockSizeException,
BadPaddingException
sKey - the secret key used for decryptioncipheredBits - Encrypted data
NoSuchPaddingException
NoSuchAlgorithmException
InvalidKeyException
BadPaddingException
IllegalBlockSizeException
public static KeyPair genAsymetricKey(String algo,
int size)
throws NoSuchAlgorithmException,
NoSuchProviderException
algo - The symetric Algorithm : usually RSA, DSA or ECDSAsize - The size of the KeyPair, usually in bytes
NoSuchProviderException
NoSuchAlgorithmException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||