public class HeadMnemonic extends Object
| Constructor and Description |
|---|
HeadMnemonic()
Create e new Encryption header helper
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
Decrypt(String input)
Decrypt input byte array
|
void |
EnableDecryption(byte[] pk)
Enable RS decryption
|
void |
EnableDecryption(PrivateKey pk)
Enable RS decryption
|
void |
EnableEncryption(byte[] pk)
Enable RS encryption
|
void |
EnableEncryption(PublicKey pk)
Enable RS encryption
|
String |
Encrypt(byte[] input)
Encrypt input byte array
|
PrivateKey |
getPrivatekey()
Get private key
|
RSAPublicKey |
getPublickey()
Get public key
|
void |
setPrivatekey(PrivateKey privatekey)
Set private key
|
void |
setPublickey(RSAPublicKey publickey)
Set public key
|
public void EnableEncryption(PublicKey pk) throws Exception
pk - Public keyException - An error occurredpublic void EnableEncryption(byte[] pk)
throws Exception
pk - Public keyException - An error occurredpublic void EnableDecryption(PrivateKey pk) throws Exception
pk - Public keyException - An error occurredpublic void EnableDecryption(byte[] pk)
throws Exception
pk - Public keyException - An error occurredpublic String Encrypt(byte[] input) throws Exception
input - byte arrayException - Encryption failedpublic byte[] Decrypt(String input) throws Exception
input - byte arrayException - Encryption failedpublic PrivateKey getPrivatekey()
public void setPrivatekey(PrivateKey privatekey)
privatekey - the private keypublic RSAPublicKey getPublickey()
public void setPublickey(RSAPublicKey publickey)
publickey - the public keyCopyright © 2014. All Rights Reserved.