public class KeyAgentIdentity extends Object implements PublicKeyIdentity
SshAgent
to generate the identity signatureConstructor and Description |
---|
KeyAgentIdentity(SshAgent agent,
PublicKey key,
String comment) |
Modifier and Type | Method and Description |
---|---|
String |
getComment() |
KeyPair |
getKeyIdentity() |
Map.Entry<String,byte[]> |
sign(SessionContext session,
String algo,
byte[] data)
Proves the public key identity by signing the given data
|
String |
toString() |
public KeyPair getKeyIdentity()
getKeyIdentity
in interface PublicKeyIdentity
KeyPair
identity valuepublic String getComment()
public Map.Entry<String,byte[]> sign(SessionContext session, String algo, byte[] data) throws Exception
PublicKeyIdentity
sign
in interface PublicKeyIdentity
session
- 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–2024 The Apache Software Foundation. All rights reserved.