public class KeyGenerator extends Object
| Constructor and Description |
|---|
KeyGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static PublicKey |
GenKeyFromBytes(byte[] encKey)
Generate a key from byte array
|
KeyPair |
GenKeyPair()
Generate a key pair
|
int |
getKeySize()
Get the key size
|
boolean |
setKeySize(int keySize)
Set the key size
|
public static PublicKey GenKeyFromBytes(byte[] encKey) throws Exception
encKey - the encryption keyException - Failed to generate keypublic KeyPair GenKeyPair() throws Exception
Exception - Failed to generate keypublic int getKeySize()
public boolean setKeySize(int keySize)
keySize - the key sizeCopyright © 2020. All Rights Reserved.