Class KeyPairIdentity

java.lang.Object
org.apache.sshd.client.auth.pubkey.KeyPairIdentity
All Implemented Interfaces:
org.apache.sshd.client.auth.pubkey.PublicKeyIdentity, org.apache.sshd.common.signature.SignatureFactoriesHolder

public class KeyPairIdentity extends Object implements org.apache.sshd.client.auth.pubkey.PublicKeyIdentity, org.apache.sshd.common.signature.SignatureFactoriesHolder
Uses a KeyPair to generate the identity signature
Author:
Apache MINA SSHD Project
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyPairIdentity(org.apache.sshd.common.signature.SignatureFactoriesManager primary, org.apache.sshd.common.signature.SignatureFactoriesManager secondary, KeyPair pair)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.signature.Signature>>
     
    sign(org.apache.sshd.common.session.SessionContext session, String algo, byte[] data)
     
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesHolder

    getSignatureFactoriesNameList, getSignatureFactoriesNames
  • Constructor Details

    • KeyPairIdentity

      public KeyPairIdentity(org.apache.sshd.common.signature.SignatureFactoriesManager primary, org.apache.sshd.common.signature.SignatureFactoriesManager secondary, KeyPair pair)
  • Method Details

    • getKeyIdentity

      public KeyPair getKeyIdentity()
      Specified by:
      getKeyIdentity in interface org.apache.sshd.client.auth.pubkey.PublicKeyIdentity
    • getSignatureFactories

      public List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.signature.Signature>> getSignatureFactories()
      Specified by:
      getSignatureFactories in interface org.apache.sshd.common.signature.SignatureFactoriesHolder
    • sign

      public Map.Entry<String,byte[]> sign(org.apache.sshd.common.session.SessionContext session, String algo, byte[] data) throws Exception
      Specified by:
      sign in interface org.apache.sshd.client.auth.pubkey.PublicKeyIdentity
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object