|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.maverick.sshd.components.ServerComponentManager
com.maverick.sshd.components.jce.JCEServerComponentManager
public class JCEServerComponentManager
A component manager for the Java runtime JCE provider. By default all algorithms will be selected from the default provider i.e no provider is specified in calls to JCE methods to create components. You can initialize a default provider to be used on all calls with the following code:
Alternatively you can also assign a specific provider for an individual algorithm, all algorithms used by the API are included as static constants in this class.JCEComponentManager.initializeDefaultProvider(new BouncyCastleProvider());
JCEComponentManager.initializeProviderForAlgorithm(JCEComponentManager.JCE_DSA,
new BouncyCastleProvider());
| Field Summary |
|---|
| Fields inherited from interface com.maverick.ssh.components.jce.JCEAlgorithms |
|---|
JCE_AESCBCNOPADDING, JCE_AESCTRNOPADDING, JCE_BLOWFISHCBCNOPADDING, JCE_DESCBCNOPADDING, JCE_DH, JCE_DSA, JCE_HMACMD5, JCE_HMACSHA1, JCE_MD5, JCE_RSA, JCE_RSANONEPKCS1PADDING, JCE_SHA1, JCE_SHA1PRNG, JCE_SHA1WithDSA, JCE_SHA1WithRSA, JCE_X509 |
| Constructor Summary | |
|---|---|
JCEServerComponentManager()
|
|
| Method Summary | |
|---|---|
com.maverick.ssh.components.SshDsaPrivateKey |
createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y)
|
com.maverick.ssh.components.SshDsaPublicKey |
createDsaPublicKey()
|
com.maverick.ssh.components.SshDsaPublicKey |
createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y)
|
com.maverick.ssh.components.SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient)
|
com.maverick.ssh.components.SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient)
|
com.maverick.ssh.components.SshRsaPrivateKey |
createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent)
|
com.maverick.ssh.components.SshRsaPublicKey |
createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent,
int version)
|
com.maverick.ssh.components.SshRsaPublicKey |
createSsh2RsaPublicKey()
|
com.maverick.ssh.components.SshKeyPair |
generateDsaKeyPair(int bits)
|
com.maverick.ssh.components.SshKeyPair |
generateRsaKeyPair(int bits)
|
static Provider |
getProviderForAlgorithm(String jceAlgorithm)
Get the provider for a specific algorithm. |
com.maverick.ssh.components.SshSecureRandomGenerator |
getRND()
|
static SecureRandom |
getSecureRandom()
Get the secure random implementation for the API. |
static String |
getSecureRandomAlgorithm()
Get the algorithm used for secure random number generation. |
static void |
initializeDefaultProvider(Provider provider)
Initialize the default JCE provider used by the API. |
protected void |
initializeDigestFactory(com.maverick.ssh.components.ComponentFactory digests)
|
protected void |
initializeHmacFactory(com.maverick.ssh.components.ComponentFactory hmacs)
|
protected void |
initializeKeyExchangeFactory(com.maverick.ssh.components.ComponentFactory keyexchange)
|
static void |
initializeProviderForAlgorithm(String jceAlgorithm,
Provider provider)
Initialize a provider for a specific algorithm. |
protected void |
initializePublicKeyFactory(com.maverick.ssh.components.ComponentFactory publickeys)
|
protected void |
initializeSsh2CipherFactory(com.maverick.ssh.components.ComponentFactory ciphers)
|
void |
loadKeystore(File keystoreFile,
String alias,
String storePassphrase,
String keyPassphrase,
SshContext context)
Load a keystore for use as an SSH host key. |
static void |
setSecureRandomAlgorithm(String secureRandomAlgorithm)
Set the algorithm used for secure random number generation. |
| Methods inherited from class com.maverick.sshd.components.ServerComponentManager |
|---|
getInstance, init, setInstance, supportedDigests, supportedHMacsCS, supportedHMacsSC, supportedKeyExchanges, supportedPublicKeys, supportedSsh2CiphersCS, supportedSsh2CiphersSC |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JCEServerComponentManager()
| Method Detail |
|---|
public static void initializeDefaultProvider(Provider provider)
provider -
public static void initializeProviderForAlgorithm(String jceAlgorithm,
Provider provider)
jceAlgorithm - provider - public static String getSecureRandomAlgorithm()
public static void setSecureRandomAlgorithm(String secureRandomAlgorithm)
secureRandomAlgorithm - public static Provider getProviderForAlgorithm(String jceAlgorithm)
jceAlgorithm -
public static SecureRandom getSecureRandom()
throws NoSuchAlgorithmException
NoSuchAlgorithmException
public com.maverick.ssh.components.SshDsaPrivateKey createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y)
throws com.maverick.ssh.SshException
createDsaPrivateKey in class ServerComponentManagercom.maverick.ssh.SshException
public com.maverick.ssh.components.SshDsaPublicKey createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y)
throws com.maverick.ssh.SshException
createDsaPublicKey in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshDsaPublicKey createDsaPublicKey()
createDsaPublicKey in class ServerComponentManager
public com.maverick.ssh.components.SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient)
throws com.maverick.ssh.SshException
createRsaPrivateCrtKey in class ServerComponentManagercom.maverick.ssh.SshException
public com.maverick.ssh.components.SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient)
throws com.maverick.ssh.SshException
createRsaPrivateCrtKey in class ServerComponentManagercom.maverick.ssh.SshException
public com.maverick.ssh.components.SshRsaPrivateKey createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent)
throws com.maverick.ssh.SshException
createRsaPrivateKey in class ServerComponentManagercom.maverick.ssh.SshException
public com.maverick.ssh.components.SshRsaPublicKey createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent,
int version)
throws com.maverick.ssh.SshException
createRsaPublicKey in class ServerComponentManagercom.maverick.ssh.SshException
public com.maverick.ssh.components.SshRsaPublicKey createSsh2RsaPublicKey()
throws com.maverick.ssh.SshException
createSsh2RsaPublicKey in class ServerComponentManagercom.maverick.ssh.SshException
public com.maverick.ssh.components.SshKeyPair generateDsaKeyPair(int bits)
throws com.maverick.ssh.SshException
generateDsaKeyPair in class ServerComponentManagercom.maverick.ssh.SshException
public com.maverick.ssh.components.SshKeyPair generateRsaKeyPair(int bits)
throws com.maverick.ssh.SshException
generateRsaKeyPair in class ServerComponentManagercom.maverick.ssh.SshException
public com.maverick.ssh.components.SshSecureRandomGenerator getRND()
throws com.maverick.ssh.SshException
getRND in class ServerComponentManagercom.maverick.ssh.SshExceptionprotected void initializeDigestFactory(com.maverick.ssh.components.ComponentFactory digests)
initializeDigestFactory in class ServerComponentManagerprotected void initializeHmacFactory(com.maverick.ssh.components.ComponentFactory hmacs)
initializeHmacFactory in class ServerComponentManagerprotected void initializeKeyExchangeFactory(com.maverick.ssh.components.ComponentFactory keyexchange)
initializeKeyExchangeFactory in class ServerComponentManagerprotected void initializePublicKeyFactory(com.maverick.ssh.components.ComponentFactory publickeys)
initializePublicKeyFactory in class ServerComponentManagerprotected void initializeSsh2CipherFactory(com.maverick.ssh.components.ComponentFactory ciphers)
initializeSsh2CipherFactory in class ServerComponentManager
public void loadKeystore(File keystoreFile,
String alias,
String storePassphrase,
String keyPassphrase,
SshContext context)
throws IOException
loadKeystore in class ServerComponentManagerkeystoreFile - path to the keystore filealias - the alias of the key in the keystorestorePassphrase - the passphrase of the keystorekeyPassphrase - the passphrase of the key
IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||