public class KeyPairIdentity extends java.lang.Object implements PublicKeyIdentity, SignatureFactoriesHolder
KeyPair to generate the identity signature| Modifier and Type | Field and Description |
|---|---|
private java.security.KeyPair |
pair |
private java.util.List<NamedFactory<Signature>> |
signatureFactories |
| Constructor and Description |
|---|
KeyPairIdentity(SignatureFactoriesManager primary,
SignatureFactoriesManager secondary,
java.security.KeyPair pair) |
| Modifier and Type | Method and Description |
|---|---|
java.security.KeyPair |
getKeyIdentity() |
java.util.List<NamedFactory<Signature>> |
getSignatureFactories() |
java.util.Map.Entry<java.lang.String,byte[]> |
sign(SessionContext session,
java.lang.String algo,
byte[] data)
Proves the public key identity by signing the given data
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSignatureFactoriesNameList, getSignatureFactoriesNamesprivate final java.security.KeyPair pair
private final java.util.List<NamedFactory<Signature>> signatureFactories
public KeyPairIdentity(SignatureFactoriesManager primary, SignatureFactoriesManager secondary, java.security.KeyPair pair)
public java.security.KeyPair getKeyIdentity()
getKeyIdentity in interface PublicKeyIdentityKeyPair identity valuepublic java.util.List<NamedFactory<Signature>> getSignatureFactories()
getSignatureFactories in interface SignatureFactoriesHolderSignature factoriespublic java.util.Map.Entry<java.lang.String,byte[]> sign(SessionContext session, java.lang.String algo, byte[] data) throws java.lang.Exception
PublicKeyIdentitysign in interface PublicKeyIdentitysession - The SessionContext for calling this method - may be null if not called within a
session contextalgo - Recommended signature algorithm - if null/empty then one will be selected based on the
key type and/or signature factories. Note: even if specific algorithm specified, the
implementation may disregard and choose anotherdata - Data to signjava.lang.Exception - If failed to sign the datapublic java.lang.String toString()
toString in class java.lang.Object