org.bouncycastle.x509
Class X509Util
java.lang.Object
org.bouncycastle.x509.X509Util
class X509Util
- extends java.lang.Object
Field Summary |
private static java.util.Hashtable |
algorithms
|
private static java.util.Set |
noParams
|
private static java.util.Hashtable |
params
|
Method Summary |
(package private) static byte[] |
calculateSignature(DERObjectIdentifier sigOid,
java.lang.String sigName,
java.security.PrivateKey key,
java.security.SecureRandom random,
ASN1Encodable object)
|
(package private) static byte[] |
calculateSignature(DERObjectIdentifier sigOid,
java.lang.String sigName,
java.lang.String provider,
java.security.PrivateKey key,
java.security.SecureRandom random,
ASN1Encodable object)
|
(package private) static X509Principal |
convertPrincipal(javax.security.auth.x500.X500Principal principal)
|
private static RSASSAPSSparams |
creatPSSParams(AlgorithmIdentifier hashAlgId,
int saltSize)
|
(package private) static java.util.Iterator |
getAlgNames()
|
(package private) static DERObjectIdentifier |
getAlgorithmOID(java.lang.String algorithmName)
|
(package private) static X509Util.Implementation |
getImplementation(java.lang.String baseName,
java.lang.String algorithm)
return an implementation for a given algorithm/provider. |
(package private) static X509Util.Implementation |
getImplementation(java.lang.String baseName,
java.lang.String algorithm,
java.security.Provider prov)
see if we can find an algorithm (or its alias and what it represents) in
the property table for the given provider. |
(package private) static java.security.Provider |
getProvider(java.lang.String provider)
|
(package private) static AlgorithmIdentifier |
getSigAlgID(DERObjectIdentifier sigOid,
java.lang.String algorithmName)
|
(package private) static java.security.Signature |
getSignatureInstance(java.lang.String algorithm)
|
(package private) static java.security.Signature |
getSignatureInstance(java.lang.String algorithm,
java.lang.String provider)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
algorithms
private static java.util.Hashtable algorithms
params
private static java.util.Hashtable params
noParams
private static java.util.Set noParams
X509Util
X509Util()
creatPSSParams
private static RSASSAPSSparams creatPSSParams(AlgorithmIdentifier hashAlgId,
int saltSize)
getAlgorithmOID
static DERObjectIdentifier getAlgorithmOID(java.lang.String algorithmName)
getSigAlgID
static AlgorithmIdentifier getSigAlgID(DERObjectIdentifier sigOid,
java.lang.String algorithmName)
getAlgNames
static java.util.Iterator getAlgNames()
getSignatureInstance
static java.security.Signature getSignatureInstance(java.lang.String algorithm)
throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
getSignatureInstance
static java.security.Signature getSignatureInstance(java.lang.String algorithm,
java.lang.String provider)
throws java.security.NoSuchProviderException,
java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchProviderException
java.security.NoSuchAlgorithmException
calculateSignature
static byte[] calculateSignature(DERObjectIdentifier sigOid,
java.lang.String sigName,
java.security.PrivateKey key,
java.security.SecureRandom random,
ASN1Encodable object)
throws java.io.IOException,
java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.SignatureException
- Throws:
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
calculateSignature
static byte[] calculateSignature(DERObjectIdentifier sigOid,
java.lang.String sigName,
java.lang.String provider,
java.security.PrivateKey key,
java.security.SecureRandom random,
ASN1Encodable object)
throws java.io.IOException,
java.security.NoSuchProviderException,
java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.SignatureException
- Throws:
java.io.IOException
java.security.NoSuchProviderException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
convertPrincipal
static X509Principal convertPrincipal(javax.security.auth.x500.X500Principal principal)
getImplementation
static X509Util.Implementation getImplementation(java.lang.String baseName,
java.lang.String algorithm,
java.security.Provider prov)
throws java.security.NoSuchAlgorithmException
- see if we can find an algorithm (or its alias and what it represents) in
the property table for the given provider.
- Throws:
java.security.NoSuchAlgorithmException
getImplementation
static X509Util.Implementation getImplementation(java.lang.String baseName,
java.lang.String algorithm)
throws java.security.NoSuchAlgorithmException
- return an implementation for a given algorithm/provider.
If the provider is null, we grab the first avalaible who has the required algorithm.
- Throws:
java.security.NoSuchAlgorithmException
getProvider
static java.security.Provider getProvider(java.lang.String provider)
throws java.security.NoSuchProviderException
- Throws:
java.security.NoSuchProviderException