public class ValueHiding extends Object
| 构造器和说明 |
|---|
ValueHiding()
Instantiates a new Value hiding.
|
ValueHiding(byte[] pub,
byte[] priv,
HidingType type)
Instantiates a new Value hiding.
|
ValueHiding(long ptr)
Instantiates a new Value hiding.
|
| 限定符和类型 | 方法和说明 |
|---|---|
EncResult |
decrypt(byte[] enc)
Decrypt boolean.
|
boolean |
decrypt(byte[] enc,
long plain)
Decrypt boolean.
|
void |
destory()
Destory.
|
EncResult |
encrypt(byte[] plain)
Encrypt boolean.
|
boolean |
encrypt(long plain,
EncResult enc)
Encrypt boolean.
|
boolean |
fromBytes(byte[] b)
From bytes boolean.
|
static ValueHiding |
genKeyPair(HidingType type)
Gen key pair value hiding.
|
byte[] |
getPrivateKey()
Get private key byte [ ].
|
long |
getPtr()
Gets ptr.
|
byte[] |
getPubKey()
Get pub key byte [ ].
|
boolean |
loadKey(String path,
String passwd)
Load key boolean.
|
byte[] |
toBytes()
To bytes byte [ ].
|
public ValueHiding()
public ValueHiding(long ptr)
ptr - the ptrpublic ValueHiding(byte[] pub,
byte[] priv,
HidingType type)
pub - the pubpriv - the privtype - the typepublic static ValueHiding genKeyPair(HidingType type)
type - the typepublic void destory()
public boolean loadKey(String path, String passwd)
path - the pathpasswd - the passwdpublic boolean encrypt(long plain,
EncResult enc)
plain - the plainenc - the encpublic boolean decrypt(byte[] enc,
long plain)
enc - the encplain - the plainpublic EncResult encrypt(byte[] plain)
plain - the plainpublic EncResult decrypt(byte[] enc)
enc - the encpublic final byte[] getPubKey()
public final byte[] getPrivateKey()
public byte[] toBytes()
public boolean fromBytes(byte[] b)
b - the bpublic long getPtr()
Copyright © 2022. All rights reserved.