public class KeyPairIdentity extends java.lang.Object implements PublicKeyIdentity
KeyPair to generate the identity signature| Modifier and Type | Field and Description |
|---|---|
private java.security.KeyPair |
pair |
private java.util.Collection<NamedFactory<Signature>> |
signatureFactories |
| Constructor and Description |
|---|
KeyPairIdentity(SignatureFactoriesManager primary,
SignatureFactoriesManager secondary,
java.security.KeyPair pair) |
| Modifier and Type | Method and Description |
|---|---|
java.security.PublicKey |
getPublicKey() |
byte[] |
sign(byte[] data)
Proves the public key identity by signing the given data
|
java.lang.String |
toString() |
private final java.security.KeyPair pair
private final java.util.Collection<NamedFactory<Signature>> signatureFactories
public KeyPairIdentity(SignatureFactoriesManager primary, SignatureFactoriesManager secondary, java.security.KeyPair pair)
public java.security.PublicKey getPublicKey()
getPublicKey in interface PublicKeyIdentityPublicKey identity valuepublic byte[] sign(byte[] data)
throws java.lang.Exception
PublicKeyIdentitysign in interface PublicKeyIdentitydata - Data to signjava.lang.Exception - If failed to sign the datapublic java.lang.String toString()
toString in class java.lang.Object