Interface ComponentInstanceFactory<T extends Component>

Type Parameters:
T - type of component
All Known Subinterfaces:
DigestFactory<T>, ExecutableCommand.ExecutableCommandFactory<T>, KeyGeneratorFactory<T>, SshCipherFactory<T>, SshCompressionFactory<T>, SshHmacFactory<T>, SshPublicKeyFactory<T>
All Known Implementing Classes:
AES128Cbc.AES128CbcFactory, AES128Ctr.AES128CtrFactory, AES128Gcm.AES128GcmFactory, AES192Cbc.AES192CbcFactory, AES192Ctr.AES192CtrFactory, AES256Cbc.AES256CbcFactory, AES256Ctr.AES256CtrFactory, AES256Gcm.AES256GcmFactory, ArcFour.ArcFourFactory, ArcFour128.ArcFour128Factory, ArcFour256.ArcFour256Factory, BlowfishCbc.BlowfishCbcFactory, ChaCha20Poly1305.ChaCha20Poly1305Factory, HmacMD5.HmacMD5Factory, HmacMD596.HmacMD596Factory, HmacMD5ETM.HmacMD5ETMFactory, HmacRipeMd160.HmacRipeMd160Factory, HmacRipeMd160ETM.HmacRipeMd160ETMFactory, HmacSha1.HmacSha1Factory, HmacSha196.HmacSha196Factory, HmacSha1ETM.HmacSha1ETMFactory, HmacSha256_96.HmacSha256_96Factory, HmacSha256_at_ssh_dot_com.HmacSha256_at_ssh_dot_comFactory, HmacSha256.HmacSha256Factory, HmacSha256ETM.HmacSha256ETMFactory, HmacSha512_96.HmacSha512_96Factory, HmacSha512.HmacSha512Factory, HmacSha512ETM.HmacSha512ETMFactory, MD5Digest.MD5DigestFactory, NoneCipher.NoneCipherFactory, NoneCompression.NoneCompressionFactory, NoneHmac.NoneHmacFactory, OpenSshEcdsaSha2Nist256Certificate.OpenSshEcdsaSha2Nist256CertificateFactory, OpenSshEcdsaSha2Nist384Certificate.OpenSshEcdsaSha2Nist384CertificateFactory, OpenSshEcdsaSha2Nist521Certificate.OpenSshEcdsaSha2Nist521CertificateFactory, OpenSshEd25519Certificate.OpenSshEd25519CertificateFactory, OpenSshRsaCertificate.OpenSshRsaCertificateFactory, OpenSshRsaSha256Certificate.OpenSshRsaSha256CertificateFactory, OpenSshRsaSha512Certificate.OpenSshRsaSha512CertificateFactory, OpenSSHZLibCompression.OpenSSHZLibCompressionFactory, ScpCommand.ScpCommandFactory, SHA1Digest.SHA1DigestFactory, SHA256Digest.SHA256DigestFactory, SHA384Digest.SHA384DigestFactory, SHA512Digest.SHA512DigestFactory, Ssh2DsaPublicKey.Ssh2DsaPublicKeyFactory, Ssh2EcdsaSha2Nist256PublicKey.Ssh2EcdsaSha2Nist256PublicKeyFactory, Ssh2EcdsaSha2Nist384PublicKey.Ssh2EcdsaSha2Nist384PublicKeyFactory, Ssh2EcdsaSha2Nist521PublicKey.Ssh2EcdsaSha2Nist521PublicKeyFactory, Ssh2RsaPublicKey.Ssh2RsaPublicKeyFactory, Ssh2RsaPublicKeySHA256.Ssh2RsaPublicKeySHA256Factory, Ssh2RsaPublicKeySHA512.Ssh2RsaPublicKeySHA512Factory, SshEd25519PublicKeyJCE.SshEd25519PublicKeyJCEFactory, SshEd448PublicKeyJCE.SshEd448PublicKeyJCEFactory, TripleDesCbc.TripleDesCbcFactory, TripleDesCtr.TripleDesCtrFactory, ZLibCompression.ZLibCompressionFactory

public interface ComponentInstanceFactory<T extends Component>
Responsible for creating instances of components such as public key, kex, digest, compression algorithms. Each component implementation has an associated ComponentInstanceFactory specialisation that can create an instance of the component.

The factory should also declare whether is enabled by default, and the keys that are used to identifiy it.

  • Method Summary

    Modifier and Type
    Method
    Description
    Create a new instance of the component.
    Get the internal keys used to identify this component.
    default boolean
    Get if the component should be enabled by default.
  • Method Details

    • isEnabledByDefault

      default boolean isEnabledByDefault()
      Get if the component should be enabled by default. Disabled components are usually obsolete or insecure components.
      Returns:
      enabled by default
    • create

      Create a new instance of the component.
      Returns:
      component
      Throws:
      NoSuchAlgorithmException - if no such algorithm exists
      IOException - any other error
    • getKeys

      String[] getKeys()
      Get the internal keys used to identify this component. The same component may be identified by more than one key, for example SHA256 and SHA-256. The first key in the array is the algorithms primary key.
      Returns:
      key