Top Description Methods
org.apache.sshd.client.auth.pubkey

public Interface PublicKeyIdentity

Imports
java.security.KeyPair, java.util.Map, org.apache.sshd.common.session.SessionContext

Represents a public key identity
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public KeyPair

Returns:

The KeyPair identity value
getKeyIdentity
()

public Map.Entry<String, byte[]>

Returns:

used algorithm + signed data - using the identity
sign
(SessionContext
The SessionContext for calling this method - may be null if not called within a session context
session
,
String
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 another

algo
,
byte[]
Data to sign
data
)

Proves the public key identity by signing the given data

Method Detail

getKeyIdentityback to summary
public KeyPair getKeyIdentity()
Returns:KeyPair

The KeyPair identity value

signback to summary
public Map.Entry<String, byte[]> sign(SessionContext session, String algo, byte[] data) throws Exception

Proves the public key identity by signing the given data

Parameters
session:SessionContext

The SessionContext for calling this method - may be null if not called within a session context

algo:String

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 another

data:byte[]

Data to sign

Returns:Map.Entry<String, byte[]>

used algorithm + signed data - using the identity

Exceptions
Exception:
If failed to sign the data