Package org.gudy.bouncycastle.x509
Class X509Util
- java.lang.Object
-
- org.gudy.bouncycastle.x509.X509Util
-
class X509Util extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
X509Util.Implementation
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Hashtable
algorithms
private static java.util.Set
noParams
private static java.util.Hashtable
params
-
Constructor Summary
Constructors Constructor Description X509Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (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 byte[]
calculateSignature(DERObjectIdentifier sigOid, java.lang.String sigName, java.security.PrivateKey key, java.security.SecureRandom random, ASN1Encodable object)
(package private) static X509Principal
convertPrincipal(javax.security.auth.x500.X500Principal principal)
(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)
-
-
-
Method Detail
-
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
-
-