|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.ssh.components.ComponentManager
public abstract class ComponentManager
An abstract class that manages the components used by the SSH API. All
algorithm implementations are obtained through a single provider. Two
implementations are provided, the StandaloneComponentManager
which uses internal algorithm implementations and the JCEComponentManager that uses
the Java runtime JCE provider(s) algorithm implementations.
If both component managers are available on the classpath then the standalone version will be selected. Jar files have been provided that contain both maverick-all.jar , the standalone only maverick-standalone-only.jar and the JCE only maverick-jce-only.jar.
| Constructor Summary | |
|---|---|
ComponentManager()
|
|
| Method Summary | |
|---|---|
abstract SshDsaPrivateKey |
createDsaPrivateKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger x,
java.math.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(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger y)
Create an instance of a DSA public key. |
abstract SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger primeP,
java.math.BigInteger primeQ,
java.math.BigInteger crtCoefficient)
Create an instance of an RSA co-effecient private key. |
abstract SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger primeP,
java.math.BigInteger primeQ,
java.math.BigInteger primeExponentP,
java.math.BigInteger primeExponentQ,
java.math.BigInteger crtCoefficient)
Create an instance of an RSA co-efficent private key. |
abstract SshRsaPrivateKey |
createRsaPrivateKey(java.math.BigInteger modulus,
java.math.BigInteger privateExponent)
Create an instance of an RSA private key. |
abstract SshRsaPublicKey |
createRsaPublicKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
int version)
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 |
generateRsaKeyPair(int bits,
int version)
Generate an RSA public/private pair. |
static ComponentManager |
getInstance()
Get the installed component manager. |
static boolean |
getPerContextAlgorithmPreferences()
|
abstract SshSecureRandomGenerator |
getRND()
Get the secure random number generator. |
protected void |
init()
|
protected abstract void |
initializeDigestFactory(ComponentFactory digests)
Initialize the digest factory. |
protected abstract void |
initializeHmacFactory(ComponentFactory hmacs)
Initialize the SSH2 HMAC factory. |
protected abstract void |
initializeKeyExchangeFactory(ComponentFactory keyexchange)
Initialize the SSH2 key exchange factory. |
protected abstract void |
initializePublicKeyFactory(ComponentFactory publickeys)
Initialize the public key factory. |
protected abstract void |
initializeSsh1CipherFactory(ComponentFactory ciphers)
Initialize the SSH1 cipher factory. |
protected abstract void |
initializeSsh2CipherFactory(ComponentFactory ciphers)
Initialize the SSH2 cipher factory. |
static boolean |
isEnableNoneCipher()
|
static void |
setEnableNoneCipher(boolean enableNoneCipher)
|
static void |
setInstance(ComponentManager instance)
Overide the installed component manager with an alternative implementation. |
static void |
setPerContextAlgorithmPreferences(boolean enable)
|
ComponentFactory |
supportedDigests()
The supported digests |
ComponentFactory |
supportedHMacsCS()
The supported SSH2 Hmacs. |
ComponentFactory |
supportedHMacsSC()
The supported SSH2 Hmacs. |
ComponentFactory |
supportedKeyExchanges()
The supported SSH2 key exchanges. |
ComponentFactory |
supportedPublicKeys()
The supported public keys |
ComponentFactory |
supportedSsh1CiphersCS()
The supported SSH1 ciphers. |
ComponentFactory |
supportedSsh1CiphersSC()
The supported SSH1 ciphers. |
ComponentFactory |
supportedSsh2CiphersCS()
The supported SSH2 ciphers. |
ComponentFactory |
supportedSsh2CiphersSC()
The supported SSH2 ciphers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComponentManager()
| Method Detail |
|---|
public static boolean isEnableNoneCipher()
public static void setEnableNoneCipher(boolean enableNoneCipher)
public static void setPerContextAlgorithmPreferences(boolean enable)
public static boolean getPerContextAlgorithmPreferences()
public static ComponentManager getInstance()
protected void init()
throws SshException
SshExceptionprotected abstract void initializeSsh1CipherFactory(ComponentFactory ciphers)
ciphers - protected abstract void initializeSsh2CipherFactory(ComponentFactory ciphers)
ciphers - protected abstract void initializeHmacFactory(ComponentFactory hmacs)
hmacs - protected abstract void initializePublicKeyFactory(ComponentFactory publickeys)
publickeys - protected abstract void initializeKeyExchangeFactory(ComponentFactory keyexchange)
keyexchange - protected abstract void initializeDigestFactory(ComponentFactory digests)
digests - public static void setInstance(ComponentManager instance)
instance - public ComponentFactory supportedSsh1CiphersSC()
public ComponentFactory supportedSsh1CiphersCS()
public ComponentFactory supportedSsh2CiphersSC()
public ComponentFactory supportedSsh2CiphersCS()
public ComponentFactory supportedHMacsSC()
public ComponentFactory supportedHMacsCS()
public ComponentFactory supportedKeyExchanges()
public ComponentFactory supportedPublicKeys()
public ComponentFactory supportedDigests()
public abstract SshKeyPair generateRsaKeyPair(int bits,
int version)
throws SshException
bits - version -
SshException
public abstract SshRsaPublicKey createRsaPublicKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
int version)
throws SshException
modulus - publicExponent - version -
SshException
public abstract SshRsaPublicKey createSsh2RsaPublicKey()
throws SshException
SshException
public abstract SshRsaPrivateKey createRsaPrivateKey(java.math.BigInteger modulus,
java.math.BigInteger privateExponent)
throws SshException
modulus - privateExponent -
SshException
public abstract SshRsaPrivateCrtKey createRsaPrivateCrtKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger primeP,
java.math.BigInteger primeQ,
java.math.BigInteger crtCoefficient)
throws SshException
modulus - publicExponent - privateExponent - primeP - primeQ - crtCoefficient -
SshException
public abstract SshRsaPrivateCrtKey createRsaPrivateCrtKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger primeP,
java.math.BigInteger primeQ,
java.math.BigInteger primeExponentP,
java.math.BigInteger primeExponentQ,
java.math.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(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger y)
throws SshException
p - q - g - y -
SshExceptionpublic abstract SshDsaPublicKey createDsaPublicKey()
public abstract SshDsaPrivateKey createDsaPrivateKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger x,
java.math.BigInteger y)
throws SshException
p - q - g - x - y -
SshException
public abstract SshSecureRandomGenerator getRND()
throws SshException
SshException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||