public class JCEServerComponentManager extends ServerComponentManager implements com.maverick.ssh.components.jce.JCEAlgorithms
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());
JCE_3DESCBCNOPADDING, JCE_3DESCTRNOPADDING, JCE_AESCBCNOPADDING, JCE_AESCTRNOPADDING, JCE_ARCFOUR, JCE_BLOWFISHCBCNOPADDING, JCE_DESCBCNOPADDING, JCE_DH, JCE_DSA, JCE_HMACMD5, JCE_HMACSHA1, JCE_HMACSHA256, JCE_HMACSHA512, JCE_MD5, JCE_MD5WithRSA, JCE_RSA, JCE_RSANONEPKCS1PADDING, JCE_SHA1, JCE_SHA1PRNG, JCE_SHA1WithDSA, JCE_SHA1WithRSA, JCE_SHA256, JCE_X509| Constructor and Description |
|---|
JCEServerComponentManager() |
| Modifier and Type | Method and Description |
|---|---|
com.maverick.ssh.components.SshDsaPrivateKey |
createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y)
Create a DSA private key from DSA parameters.
|
com.maverick.ssh.components.SshDsaPublicKey |
createDsaPublicKey()
Create an uninitialized instance of a DSA public key.
|
com.maverick.ssh.components.SshDsaPublicKey |
createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y)
Create an instance of an DSA public key.
|
com.maverick.ssh.components.SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient)
Create a RSA co-efficient key from RSA parameters.
|
com.maverick.ssh.components.SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient)
Create an RSA co-efficient key from RSA parameters.
|
com.maverick.ssh.components.SshRsaPrivateKey |
createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent)
Create an RSA private key from RSA parameters
|
com.maverick.ssh.components.SshRsaPublicKey |
createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent,
int version)
Create an instance of an RSA public key from RSA parameters.
|
com.maverick.ssh.components.SshRsaPublicKey |
createSsh2RsaPublicKey()
Create an uninitialized instance of an RSA public key
|
com.maverick.ssh.components.SshKeyPair |
generateDsaKeyPair(int bits)
Generate a DSA key pair.
|
com.maverick.ssh.components.SshKeyPair |
generateRsaKeyPair(int bits)
Generate an RSA key pair.
|
static Provider |
getProviderForAlgorithm(String jceAlgorithm)
Get the provider for a specific algorithm.
|
com.maverick.ssh.components.SshSecureRandomGenerator |
getRND()
Get the secure number generator implementation.
|
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)
Initialize the digest factory.
|
protected void |
initializeHmacFactory(com.maverick.ssh.components.ComponentFactory hmacs)
Initialize the SSH2 HMac factory.
|
protected void |
initializeKeyExchangeFactory(com.maverick.ssh.components.ComponentFactory keyexchange)
Initialize the key exchange factory.
|
static void |
initializeProviderForAlgorithm(String jceAlgorithm,
Provider provider)
Initialize a provider for a specific algorithm.
|
protected void |
initializePublicKeyFactory(com.maverick.ssh.components.ComponentFactory publickeys)
Initialize the public key factory.
|
protected void |
initializeSsh2CipherFactory(com.maverick.ssh.components.ComponentFactory ciphers)
Initialize the SSH2 cipher factory.
|
void |
loadKeystore(File keystoreFile,
String alias,
String storePassphrase,
String keyPassphrase,
SshContext context)
Load a host key from a keystore file.
|
void |
loadKeystore(File keystoreFile,
String alias,
String storePassphrase,
String keyPassphrase,
String storeType,
SshContext context) |
void |
loadKeystore(InputStream in,
String alias,
String storePassphrase,
String keyPassphrase,
SshContext context)
Load a keystore for use as an SSH host key.
|
void |
loadKeystore(InputStream in,
String alias,
String storePassphrase,
String keyPassphrase,
String storeType,
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.
|
isEnableNoneCipher, setEnableNoneCipher, supportedCompressionsCS, supportedCompressionsSC, supportedDigests, supportedHMacsCS, supportedHMacsSC, supportedKeyExchanges, supportedPublicKeys, supportedSsh2CiphersCS, supportedSsh2CiphersSCpublic JCEServerComponentManager()
throws com.maverick.ssh.SshException
com.maverick.ssh.SshExceptionpublic 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
NoSuchAlgorithmExceptionpublic com.maverick.ssh.components.SshDsaPrivateKey createDsaPrivateKey(BigInteger p, BigInteger q, BigInteger g, BigInteger x, BigInteger y) throws com.maverick.ssh.SshException
ServerComponentManagercreateDsaPrivateKey in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshDsaPublicKey createDsaPublicKey(BigInteger p, BigInteger q, BigInteger g, BigInteger y) throws com.maverick.ssh.SshException
ServerComponentManagercreateDsaPublicKey in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshDsaPublicKey createDsaPublicKey()
ServerComponentManagercreateDsaPublicKey in class ServerComponentManagerpublic com.maverick.ssh.components.SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger crtCoefficient) throws com.maverick.ssh.SshException
ServerComponentManagercreateRsaPrivateCrtKey in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic 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
ServerComponentManagercreateRsaPrivateCrtKey in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshRsaPrivateKey createRsaPrivateKey(BigInteger modulus, BigInteger privateExponent) throws com.maverick.ssh.SshException
ServerComponentManagercreateRsaPrivateKey in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshRsaPublicKey createRsaPublicKey(BigInteger modulus, BigInteger publicExponent, int version) throws com.maverick.ssh.SshException
ServerComponentManagercreateRsaPublicKey in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshRsaPublicKey createSsh2RsaPublicKey()
throws com.maverick.ssh.SshException
ServerComponentManagercreateSsh2RsaPublicKey in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshKeyPair generateDsaKeyPair(int bits)
throws com.maverick.ssh.SshException
ServerComponentManagergenerateDsaKeyPair in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshKeyPair generateRsaKeyPair(int bits)
throws com.maverick.ssh.SshException
ServerComponentManagergenerateRsaKeyPair in class ServerComponentManagercom.maverick.ssh.SshExceptionpublic com.maverick.ssh.components.SshSecureRandomGenerator getRND()
throws com.maverick.ssh.SshException
ServerComponentManagergetRND in class ServerComponentManagercom.maverick.ssh.SshExceptionprotected void initializeDigestFactory(com.maverick.ssh.components.ComponentFactory digests)
ServerComponentManagerinitializeDigestFactory in class ServerComponentManagerprotected void initializeHmacFactory(com.maverick.ssh.components.ComponentFactory hmacs)
ServerComponentManagerinitializeHmacFactory in class ServerComponentManagerprotected void initializeKeyExchangeFactory(com.maverick.ssh.components.ComponentFactory keyexchange)
ServerComponentManagerinitializeKeyExchangeFactory in class ServerComponentManagerprotected void initializePublicKeyFactory(com.maverick.ssh.components.ComponentFactory publickeys)
ServerComponentManagerinitializePublicKeyFactory in class ServerComponentManagerprotected void initializeSsh2CipherFactory(com.maverick.ssh.components.ComponentFactory ciphers)
ServerComponentManagerinitializeSsh2CipherFactory in class ServerComponentManagerpublic void loadKeystore(InputStream in, 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 keyIOExceptionpublic void loadKeystore(InputStream in, String alias, String storePassphrase, String keyPassphrase, String storeType, 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 keyIOExceptionpublic void loadKeystore(File keystoreFile, String alias, String storePassphrase, String keyPassphrase, SshContext context) throws IOException
ServerComponentManagerloadKeystore in class ServerComponentManagerIOExceptionpublic void loadKeystore(File keystoreFile, String alias, String storePassphrase, String keyPassphrase, String storeType, SshContext context) throws IOException
loadKeystore in class ServerComponentManagerIOExceptionCopyright © 2012. All Rights Reserved.