Class BytesIdentityInfo

    • Constructor Summary

      Constructors 
      Constructor Description
      BytesIdentityInfo​(byte[] privateKey, byte[] passphrase)
      Constructs an identity info with private and passphrase for the private key.
      BytesIdentityInfo​(byte[] privateKey, byte[] publicKey, byte[] passphrase)
      Constructs an identity info with private and public key and passphrase for the private key.
    • Constructor Detail

      • BytesIdentityInfo

        public BytesIdentityInfo​(byte[] privateKey,
                                 byte[] passphrase)
        Constructs an identity info with private and passphrase for the private key.
        Parameters:
        privateKey - Private key bytes
        passphrase - The passphrase to decrypt the private key (can be null if no passphrase is used)
      • BytesIdentityInfo

        public BytesIdentityInfo​(byte[] privateKey,
                                 byte[] publicKey,
                                 byte[] passphrase)
        Constructs an identity info with private and public key and passphrase for the private key.
        Parameters:
        privateKey - Private key bytes
        publicKey - The public key part used for connections with exchange of certificates (can be null)
        passphrase - The passphrase to decrypt the private key (can be null if no passphrase is used)
    • Method Detail

      • addIdentity

        public void addIdentity​(com.jcraft.jsch.JSch jsch)
                         throws com.jcraft.jsch.JSchException
        Description copied from interface: IdentityProvider
        Add this identity to the given JSch.
        Specified by:
        addIdentity in interface IdentityProvider
        Parameters:
        jsch - Target JSch.
        Throws:
        com.jcraft.jsch.JSchException - If I/O error occurs.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getPassphrase

        public byte[] getPassphrase()
        Gets the passphrase.
        Returns:
        the passphrase.
        Since:
        2.10.0
      • getPrivateKeyBytes

        public byte[] getPrivateKeyBytes()
        Gets the private key.
        Returns:
        the private key.
      • getPublicKeyBytes

        public byte[] getPublicKeyBytes()
        Gets the public key.
        Returns:
        the public key.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object