public class Mnemonic extends Object
| Constructor and Description |
|---|
Mnemonic(byte[] enckey)
Create a new encryption helper
|
Mnemonic(Key key)
Create a new encryption helper
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
Decrypt(byte[] input)
Decrypt input byte array
|
byte[] |
Encrypt(byte[] input)
Encrypt input byte array
|
static SecretKey |
genKey()
Generate a secret key
|
Cipher |
getCipher()
Get Cipher
|
Cipher |
getDeCipher()
Get De-Cipher
|
SecretKey |
getKey()
Get Secret key
|
void |
setKey(SecretKey key)
Set Secret key
|
public Mnemonic(byte[] enckey)
throws Exception
enckey - the encryption keyException - Failed to create the helperpublic static SecretKey genKey() throws Exception
Exception - Failure in generating the keypublic byte[] Encrypt(byte[] input)
throws Exception
input - byte arrayException - Encryption failedpublic byte[] Decrypt(byte[] input)
throws Exception
input - byte arrayException - Encryption failedpublic Cipher getCipher() throws Exception
Exception - Failurepublic Cipher getDeCipher() throws Exception
Exception - Failurepublic SecretKey getKey()
public void setKey(SecretKey key)
key - secret keyCopyright © 2016. All Rights Reserved.