public abstract class ComponentManager extends Object
JCEComponentManager
that uses the
Java runtime JCE provider(s) algorithm implementations.Constructor and Description |
---|
ComponentManager() |
Modifier and Type | Method and Description |
---|---|
abstract SshDsaPrivateKey |
createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y)
Create an instance of a DSA private key.
|
abstract SshDsaPublicKey |
createDsaPublicKey()
Create an uninitialized instance of a DSA public key
|
abstract SshDsaPublicKey |
createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y)
Create an instance of a DSA public key.
|
abstract SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient)
Create an instance of an RSA co-effecient private key.
|
abstract SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient)
Create an instance of an RSA co-efficent private key.
|
abstract SshRsaPrivateKey |
createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent)
Create an instance of an RSA private key.
|
abstract SshRsaPublicKey |
createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent)
Create an instance of an RSA public key.
|
abstract SshRsaPublicKey |
createSsh2RsaPublicKey()
Create an instance of an SSH2 RSA public key.
|
abstract SshKeyPair |
generateDsaKeyPair(int bits)
Generate a new DSA public/private key pair.
|
abstract SshKeyPair |
generateEcdsaKeyPair(int bits)
Generate a new ECDSA key pair.
|
abstract SshKeyPair |
generateRsaKeyPair(int bits)
Generate an RSA public/private pair.
|
static ComponentManager |
getDefaultInstance()
Get the installed component manager.
|
abstract SshSecureRandomGenerator |
getRND()
Get the secure random number generator.
|
protected void |
init() |
protected abstract void |
initializeDigestFactory(ComponentFactory<Digest> digests)
Initialize the digest factory.
|
protected abstract void |
initializeHmacFactory(ComponentFactory<SshHmac> hmacs)
Initialize the SSH2 HMAC factory.
|
protected abstract void |
initializePublicKeyFactory(ComponentFactory<SshPublicKey> publickeys)
Initialize the public key factory.
|
protected abstract void |
initializeSsh2CipherFactory(ComponentFactory<SshCipher> ciphers)
Initialize the SSH2 cipher factory.
|
static boolean |
isEnableNoneCipher() |
static boolean |
isEnableNoneMac() |
abstract SshKeyPair[] |
loadKeystore(File keystoreFile,
String alias,
String storePassphrase,
String keyPassphrase)
Load a host key from a keystore file.
|
abstract SshKeyPair[] |
loadKeystore(File keystoreFile,
String alias,
String storePassphrase,
String keyPassphrase,
String storeType) |
abstract SshKeyPair[] |
loadKeystore(InputStream in,
String alias,
String storePassphrase,
String keyPassphrase)
Load a host key from a keystore InputStream.
|
abstract SshKeyPair[] |
loadKeystore(InputStream in,
String alias,
String storePassphrase,
String keyPassphrase,
String storeType) |
static void |
setEnableNoneCipher(boolean enableNoneCipher) |
static void |
setEnableNoneMac(boolean enableNoneCipher) |
static void |
setInstance(ComponentManager instance)
Overide the installed component manager with an alternative
implementation.
|
ComponentFactory<Digest> |
supportedDigests()
The supported digests
|
ComponentFactory<SshHmac> |
supportedHMacsCS()
The supported SSH2 Hmacs.
|
ComponentFactory<SshHmac> |
supportedHMacsSC()
The supported SSH2 Hmacs.
|
ComponentFactory<SshPublicKey> |
supportedPublicKeys()
The supported public keys
|
ComponentFactory<SshCipher> |
supportedSsh2CiphersCS()
The supported SSH2 ciphers.
|
ComponentFactory<SshCipher> |
supportedSsh2CiphersSC()
The supported SSH2 ciphers.
|
public static boolean isEnableNoneCipher()
public static void setEnableNoneCipher(boolean enableNoneCipher)
public static boolean isEnableNoneMac()
public static void setEnableNoneMac(boolean enableNoneCipher)
public static ComponentManager getDefaultInstance()
protected void init() throws SshException
SshException
protected abstract void initializeSsh2CipherFactory(ComponentFactory<SshCipher> ciphers)
ciphers
- protected abstract void initializeHmacFactory(ComponentFactory<SshHmac> hmacs)
hmacs
- protected abstract void initializePublicKeyFactory(ComponentFactory<SshPublicKey> publickeys)
publickeys
- protected abstract void initializeDigestFactory(ComponentFactory<Digest> digests)
digests
- public static void setInstance(ComponentManager instance)
instance
- public ComponentFactory<SshCipher> supportedSsh2CiphersSC()
public ComponentFactory<SshCipher> supportedSsh2CiphersCS()
public ComponentFactory<SshHmac> supportedHMacsSC()
public ComponentFactory<SshHmac> supportedHMacsCS()
public ComponentFactory<SshPublicKey> supportedPublicKeys()
public ComponentFactory<Digest> supportedDigests()
public abstract SshKeyPair generateRsaKeyPair(int bits) throws SshException
bits
- version
- SshException
public abstract SshKeyPair generateEcdsaKeyPair(int bits) throws SshException
bits
- SshException
public abstract SshRsaPublicKey createRsaPublicKey(BigInteger modulus, BigInteger publicExponent) throws SshException
modulus
- publicExponent
- version
- SshException
public abstract SshRsaPublicKey createSsh2RsaPublicKey() throws SshException
SshException
public abstract SshRsaPrivateKey createRsaPrivateKey(BigInteger modulus, BigInteger privateExponent) throws SshException
modulus
- privateExponent
- SshException
public abstract SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger crtCoefficient) throws SshException
modulus
- publicExponent
- privateExponent
- primeP
- primeQ
- crtCoefficient
- SshException
public abstract SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient) throws SshException
modulus
- publicExponent
- privateExponent
- primeP
- primeQ
- primeExponentP
- primeExponentQ
- crtCoefficient
- SshException
public abstract SshKeyPair generateDsaKeyPair(int bits) throws SshException
bits
- SshException
public abstract SshDsaPublicKey createDsaPublicKey(BigInteger p, BigInteger q, BigInteger g, BigInteger y) throws SshException
p
- q
- g
- y
- SshException
public abstract SshDsaPublicKey createDsaPublicKey()
public abstract SshDsaPrivateKey createDsaPrivateKey(BigInteger p, BigInteger q, BigInteger g, BigInteger x, BigInteger y) throws SshException
p
- q
- g
- x
- y
- SshException
public abstract SshSecureRandomGenerator getRND() throws SshException
SshException
public abstract SshKeyPair[] loadKeystore(File keystoreFile, String alias, String storePassphrase, String keyPassphrase) throws IOException
keystoreFile
- alias
- storePassphrase
- keyPassphrase
- IOException
public abstract SshKeyPair[] loadKeystore(InputStream in, String alias, String storePassphrase, String keyPassphrase) throws IOException
in
- alias
- storePassphrase
- keyPassphrase
- IOException
public abstract SshKeyPair[] loadKeystore(File keystoreFile, String alias, String storePassphrase, String keyPassphrase, String storeType) throws IOException
IOException
public abstract SshKeyPair[] loadKeystore(InputStream in, String alias, String storePassphrase, String keyPassphrase, String storeType) throws IOException
IOException
Copyright © 2016. All rights reserved.