public class JCEProvider extends Object implements JCEAlgorithms
Modifier and Type | Class and Description |
---|---|
static class |
JCEProvider.BC_FLAVOR |
CHACHA20, CHACHA20_POLY1305, ED25519, ED448, EdDSA, JCE_3DESCBCNOPADDING, JCE_3DESCTRNOPADDING, JCE_AESCBCNOPADDING, JCE_AESCTRNOPADDING, JCE_AESGCMNOPADDING, JCE_ARCFOUR, JCE_BLOWFISHCBCNOPADDING, JCE_DESCBCNOPADDING, JCE_DH, JCE_DH_KEY_AGREEMENT, JCE_DH_KEY_FACTORY, JCE_DH_KEY_GENERATOR, JCE_DSA, JCE_ECDH, JCE_HMACMD5, JCE_HMACRIPEMD160, JCE_HMACSHA1, JCE_HMACSHA256, JCE_HMACSHA512, JCE_MD5, JCE_MD5WithRSA, JCE_RSA, JCE_RSA_CIPHER, JCE_RSANONEPKCS1PADDING, JCE_SHA1, JCE_SHA1PRNG, JCE_SHA1WithDSA, JCE_SHA1WithECDSA, JCE_SHA1WithRSA, JCE_SHA256, JCE_SHA256WithECDSA, JCE_SHA256WithRSA, JCE_SHA384, JCE_SHA384WithECDSA, JCE_SHA512, JCE_SHA512WithECDSA, JCE_SHA512WithRSA, JCE_X509
Constructor and Description |
---|
JCEProvider() |
Modifier and Type | Method and Description |
---|---|
static void |
disableBouncyCastle() |
static void |
enableBouncyCastle(boolean makeDefault) |
static void |
enableBouncyCastle(boolean makeDefault,
JCEProvider.BC_FLAVOR bcFlavor,
Provider provider) |
static void |
enableSpongyCastle(boolean makeDefault) |
static Provider |
getBCProvider() |
static Provider |
getDefaultProvider() |
static KeyAgreement |
getDHKeyAgreement() |
static KeyFactory |
getDHKeyFactory() |
static KeyPairGenerator |
getDHKeyGenerator() |
static String |
getECDSAAlgorithmName() |
static KeyFactory |
getKeyFactory(String alg) |
static Provider |
getProviderForAlgorithm(String jceAlgorithm)
Get the provider for a specific algorithm.
|
static SecureRandom |
getSecureRandom()
Get the secure random implementation for the API.
|
static String |
getSecureRandomAlgorithm()
Get the algorithm used for secure random number generation.
|
static Signature |
getSignature(String alg) |
static boolean |
hasBCProvider() |
static void |
initializeDefaultProvider(Provider provider)
Initialize the default JCE provider used by the API.
|
static void |
initializeDefaultProvider(String name)
Initialize the default JCE provider used by the API.
|
static void |
initializeProviderForAlgorithm(String jceAlgorithm,
Provider provider)
Initialize a provider for a specific algorithm.
|
static void |
initializeProviderForAlgorithm(String jceAlgorithm,
String name)
Initialize a provider for a specific algorithm.
|
static boolean |
isBCDisabled() |
static boolean |
isBCEnabled() |
static void |
setECDSAAlgorithmName(String ecdsaAlgorithmName) |
static void |
setSecureRandomAlgorithm(String secureRandomAlgorithm)
Set the algorithm used for secure random number generation.
|
public static void initializeDefaultProvider(Provider provider)
provider
- public static void initializeDefaultProvider(String name) throws NoSuchProviderException
provider
- NoSuchProviderException
public static void initializeProviderForAlgorithm(String jceAlgorithm, Provider provider)
jceAlgorithm
- provider
- public static void initializeProviderForAlgorithm(String jceAlgorithm, String name) throws NoSuchProviderException
jceAlgorithm
- provider
- NoSuchProviderException
public static String getSecureRandomAlgorithm()
public static void setSecureRandomAlgorithm(String secureRandomAlgorithm)
secureRandomAlgorithm
- public static Provider getProviderForAlgorithm(String jceAlgorithm)
jceAlgorithm
- public static SecureRandom getSecureRandom()
NoSuchAlgorithmException
public static Provider getDefaultProvider()
public static boolean hasBCProvider()
public static Provider getBCProvider()
public static void enableSpongyCastle(boolean makeDefault)
public static void enableBouncyCastle(boolean makeDefault)
public static void enableBouncyCastle(boolean makeDefault, JCEProvider.BC_FLAVOR bcFlavor, Provider provider)
public static KeyFactory getDHKeyFactory() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static KeyAgreement getDHKeyAgreement() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static KeyPairGenerator getDHKeyGenerator() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static void disableBouncyCastle()
public static boolean isBCEnabled()
public static String getECDSAAlgorithmName()
public static void setECDSAAlgorithmName(String ecdsaAlgorithmName)
public static boolean isBCDisabled()
public static KeyFactory getKeyFactory(String alg) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static Signature getSignature(String alg) throws NoSuchAlgorithmException
NoSuchAlgorithmException
Copyright © 2024. All rights reserved.