public class KeyPairIdentity extends Object implements PublicKeyIdentity
KeyPair
to generate the identity signatureConstructor and Description |
---|
KeyPairIdentity(SignatureFactoriesManager primary,
SignatureFactoriesManager secondary,
KeyPair pair) |
Modifier and Type | Method and Description |
---|---|
PublicKey |
getPublicKey() |
byte[] |
sign(byte[] data)
Proves the public key identity by signing the given data
|
String |
toString() |
public KeyPairIdentity(SignatureFactoriesManager primary, SignatureFactoriesManager secondary, KeyPair pair)
public PublicKey getPublicKey()
getPublicKey
in interface PublicKeyIdentity
PublicKey
identity valuepublic byte[] sign(byte[] data) throws Exception
PublicKeyIdentity
sign
in interface PublicKeyIdentity
data
- Data to signException
- If failed to sign the dataCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.