Class BytesIdentityInfo

  • All Implemented Interfaces:
    IdentityProvider

    public class BytesIdentityInfo
    extends java.lang.Object
    implements IdentityProvider
    Structure for an identity based on byte arrays.
    Since:
    2.4
    • 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.
    • Field Detail

      • passPhrase

        private final byte[] passPhrase
      • privateKey

        private final byte[] privateKey
      • publicKey

        private final byte[] publicKey
    • 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
        Specified by:
        addIdentity in interface IdentityProvider
        Throws:
        com.jcraft.jsch.JSchException
      • getPassPhrase

        public byte[] getPassPhrase()
      • getPrivateKeyBytes

        public byte[] getPrivateKeyBytes()
      • getPublicKeyBytes

        public byte[] getPublicKeyBytes()