Interface PublicKeyIdentity
-
- All Known Implementing Classes:
KeyAgentIdentity,KeyPairIdentity
public interface PublicKeyIdentityRepresents a public key identity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.KeyPairgetKeyIdentity()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
-
-
-
Method Detail
-
getKeyIdentity
java.security.KeyPair getKeyIdentity()
- Returns:
- The
KeyPairidentity value
-
sign
java.util.Map.Entry<java.lang.String,byte[]> sign(SessionContext session, java.lang.String algo, byte[] data) throws java.lang.Exception
Proves the public key identity by signing the given data- Parameters:
session- TheSessionContextfor calling this method - may benullif 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:
java.lang.Exception- If failed to sign the data
-
-