Interface PublicKeyIdentity
- All Known Implementing Classes:
KeyAgentIdentity
,KeyPairIdentity
public interface PublicKeyIdentity
Represents a public key identity
-
Method Summary
Modifier and TypeMethodDescriptionsign
(SessionContext session, String algo, byte[] data) Proves the public key identity by signing the given data
-
Method Details
-
getPublicKey
PublicKey getPublicKey()- Returns:
- The
PublicKey
identity value
-
sign
Proves the public key identity by signing the given data- Parameters:
session
- TheSessionContext
for calling this method - may benull
if not called within a session contextalgo
- Recommended signature algorithm - ifnull
/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 sign- Returns:
- used algorithm + signed data - using the identity
- Throws:
Exception
- If failed to sign the data
-