public class KeyAgentIdentity extends java.lang.Object implements PublicKeyIdentity
SshAgent to generate the identity signature| Modifier and Type | Field and Description |
|---|---|
private SshAgent |
agent |
private java.lang.String |
comment |
private java.security.PublicKey |
key |
| Constructor and Description |
|---|
KeyAgentIdentity(SshAgent agent,
java.security.PublicKey key,
java.lang.String comment) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getComment() |
java.security.PublicKey |
getPublicKey() |
byte[] |
sign(SessionContext session,
byte[] data)
Proves the public key identity by signing the given data
|
java.lang.String |
toString() |
private final SshAgent agent
private final java.security.PublicKey key
private final java.lang.String comment
public KeyAgentIdentity(SshAgent agent, java.security.PublicKey key, java.lang.String comment)
public java.security.PublicKey getPublicKey()
getPublicKey in interface PublicKeyIdentityPublicKey identity valuepublic java.lang.String getComment()
public byte[] sign(SessionContext session, 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 contextdata - Data to signjava.lang.Exception - If failed to sign the datapublic java.lang.String toString()
toString in class java.lang.Object