public class JCEComponentManager extends ComponentManager implements 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 |
|---|
JCEComponentManager() |
| Modifier and Type | Method and Description |
|---|---|
SshDsaPrivateKey |
createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y)
Create an instance of a DSA private key.
|
SshDsaPublicKey |
createDsaPublicKey()
Create an uninitialized instance of a DSA public key
|
SshDsaPublicKey |
createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y)
Create an instance of a DSA public key.
|
SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient)
Create an instance of an RSA co-effecient private key.
|
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.
|
SshRsaPrivateKey |
createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent)
Create an instance of an RSA private key.
|
SshRsaPublicKey |
createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent)
Create an instance of an RSA public key.
|
SshRsaPublicKey |
createSsh2RsaPublicKey()
Create an instance of an SSH2 RSA public key.
|
SshKeyPair |
generateDsaKeyPair(int bits)
Generate a new DSA public/private key pair.
|
SshKeyPair |
generateRsaKeyPair(int bits)
Generate an RSA public/private pair.
|
static Provider |
getProviderForAlgorithm(String jceAlgorithm)
Get the provider for a specific algorithm.
|
SshSecureRandomGenerator |
getRND()
Get the secure random number generator.
|
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(ComponentFactory digests)
Initialize the digest factory.
|
protected void |
initializeHmacFactory(ComponentFactory hmacs)
Initialize the SSH2 HMAC factory.
|
protected void |
initializeKeyExchangeFactory(ComponentFactory keyexchange)
Initialize the SSH2 key exchange factory.
|
static void |
initializeProviderForAlgorithm(String jceAlgorithm,
Provider provider)
Initialize a provider for a specific algorithm.
|
protected void |
initializePublicKeyFactory(ComponentFactory publickeys)
Initialize the public key factory.
|
protected void |
initializeSsh2CipherFactory(ComponentFactory ciphers)
Initialize the SSH2 cipher factory.
|
static void |
setSecureRandomAlgorithm(String secureRandomAlgorithm)
Set the algorithm used for secure random number generation.
|
getInstance, getPerContextAlgorithmPreferences, init, isEnableNoneCipher, isEnableNoneMac, setEnableNoneCipher, setEnableNoneMac, setInstance, setPerContextAlgorithmPreferences, supportedDigests, supportedHMacsCS, supportedHMacsSC, supportedKeyExchanges, supportedPublicKeys, supportedSsh2CiphersCS, supportedSsh2CiphersSCpublic 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 SshDsaPrivateKey createDsaPrivateKey(BigInteger p, BigInteger q, BigInteger g, BigInteger x, BigInteger y) throws SshException
ComponentManagercreateDsaPrivateKey in class ComponentManagerSshExceptionpublic SshDsaPublicKey createDsaPublicKey(BigInteger p, BigInteger q, BigInteger g, BigInteger y) throws SshException
ComponentManagercreateDsaPublicKey in class ComponentManagerSshExceptionpublic SshDsaPublicKey createDsaPublicKey()
ComponentManagercreateDsaPublicKey in class ComponentManagerpublic SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger crtCoefficient) throws SshException
ComponentManagercreateRsaPrivateCrtKey in class ComponentManagerSshExceptionpublic SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient) throws SshException
ComponentManagercreateRsaPrivateCrtKey in class ComponentManagerSshExceptionpublic SshRsaPrivateKey createRsaPrivateKey(BigInteger modulus, BigInteger privateExponent) throws SshException
ComponentManagercreateRsaPrivateKey in class ComponentManagerSshExceptionpublic SshRsaPublicKey createRsaPublicKey(BigInteger modulus, BigInteger publicExponent) throws SshException
ComponentManagercreateRsaPublicKey in class ComponentManagerSshExceptionpublic SshRsaPublicKey createSsh2RsaPublicKey() throws SshException
ComponentManagercreateSsh2RsaPublicKey in class ComponentManagerSshExceptionpublic SshKeyPair generateDsaKeyPair(int bits) throws SshException
ComponentManagergenerateDsaKeyPair in class ComponentManagerSshExceptionpublic SshKeyPair generateRsaKeyPair(int bits) throws SshException
ComponentManagergenerateRsaKeyPair in class ComponentManagerSshExceptionpublic SshSecureRandomGenerator getRND() throws SshException
ComponentManagergetRND in class ComponentManagerSshExceptionprotected void initializeDigestFactory(ComponentFactory digests)
ComponentManagerinitializeDigestFactory in class ComponentManagerprotected void initializeHmacFactory(ComponentFactory hmacs)
ComponentManagerinitializeHmacFactory in class ComponentManagerprotected void initializeKeyExchangeFactory(ComponentFactory keyexchange)
ComponentManagerinitializeKeyExchangeFactory in class ComponentManagerprotected void initializePublicKeyFactory(ComponentFactory publickeys)
ComponentManagerinitializePublicKeyFactory in class ComponentManagerprotected void initializeSsh2CipherFactory(ComponentFactory ciphers)
ComponentManagerinitializeSsh2CipherFactory in class ComponentManagerCopyright © 2014. All rights reserved.