@SerializerId2(value="crypto.ec_key_pair") public class ECKeyPair extends SerializableObject
Constructor and Description |
---|
ECKeyPair(byte[] privateKey) |
ECKeyPair(byte[] publicKey,
byte[] privateKey) |
ECKeyPair(ECPublicKey publicKey) |
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] data) |
byte[] |
decrypt(byte[] data,
EncryptedPrivateKey sharedKey) |
EncryptedPrivateKey |
encryptPrivateKey(ECPublicKey publicKey) |
boolean |
equals(java.lang.Object o) |
static ECKeyPair |
fromFile(java.io.File file) |
byte[] |
getPrivateKey() |
ECPublicKey |
getPublicKey() |
EUID |
getUID() |
int |
hashCode() |
ECSignature |
sign(byte[] data) |
ECSignature |
sign(byte[] data,
boolean enforceLowS,
boolean beDeterministic)
Signs data using the ECPrivateKey resulting in an ECDSA signature.
|
public ECKeyPair(ECPublicKey publicKey)
public ECKeyPair(byte[] publicKey, byte[] privateKey)
public ECKeyPair(byte[] privateKey)
public static ECKeyPair fromFile(java.io.File file) throws java.io.IOException
java.io.IOException
public EUID getUID()
public EncryptedPrivateKey encryptPrivateKey(ECPublicKey publicKey)
public ECPublicKey getPublicKey()
public byte[] getPrivateKey()
public ECSignature sign(byte[] data)
public ECSignature sign(byte[] data, boolean enforceLowS, boolean beDeterministic)
public byte[] decrypt(byte[] data, EncryptedPrivateKey sharedKey) throws CryptoException
CryptoException
public byte[] decrypt(byte[] data) throws CryptoException
CryptoException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object