public class KeyPairIdentity extends Object implements PublicKeyIdentity, SignatureFactoriesHolder
KeyPair to generate the identity signature| Constructor and Description |
|---|
KeyPairIdentity(SignatureFactoriesManager primary,
SignatureFactoriesManager secondary,
KeyPair pair) |
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
getKeyIdentity() |
List<NamedFactory<Signature>> |
getSignatureFactories() |
Map.Entry<String,byte[]> |
sign(SessionContext session,
String algo,
byte[] data)
Proves the public key identity by signing the given data
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSignatureFactoriesNameList, getSignatureFactoriesNamespublic KeyPairIdentity(SignatureFactoriesManager primary, SignatureFactoriesManager secondary, KeyPair pair)
public KeyPair getKeyIdentity()
getKeyIdentity in interface PublicKeyIdentityKeyPair identity valuepublic List<NamedFactory<Signature>> getSignatureFactories()
getSignatureFactories in interface SignatureFactoriesHolderSignature factoriespublic Map.Entry<String,byte[]> sign(SessionContext session, String algo, byte[] data) throws 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 signException - If failed to sign the dataCopyright © 2008–2025 The Apache Software Foundation. All rights reserved.