kz.gamma.hardware.cms
Class CMSSignedHelper

java.lang.Object
  extended by kz.gamma.hardware.cms.CMSSignedHelper

 class CMSSignedHelper
extends java.lang.Object


Field Summary
private static java.util.Map digestAlgs
           
private static java.util.Map digestAliases
           
private static java.util.Map encryptionAlgs
           
(package private) static CMSSignedHelper INSTANCE
           
 
Constructor Summary
CMSSignedHelper()
           
 
Method Summary
private  void addCertsFromSet(java.util.List certs, ASN1Set certSet, java.lang.String provider)
           
private  boolean anyCertHasTypeOther()
           
private  boolean anyCertHasV1Attribute()
           
private  boolean anyCertHasV2Attribute()
           
private  boolean anyCrlHasTypeOther()
           
(package private)  X509Store createAttributeStore(java.lang.String type, java.lang.String provider, ASN1Set certSet)
           
(package private)  java.security.cert.CertStore createCertStore(java.lang.String type, java.lang.String provider, ASN1Set certSet, ASN1Set crlSet)
           
private  java.security.MessageDigest createDigestInstance(java.lang.String algorithm, java.lang.String provider)
           
(package private)  java.lang.String getDigestAlgName(java.lang.String digestAlgOID)
          Return the digest algorithm using one of the standard JCA string representations rather than the algorithm identifier (if possible).
(package private)  java.lang.String[] getDigestAliases(java.lang.String algName)
           
(package private)  java.security.MessageDigest getDigestInstance(java.lang.String algorithm, java.lang.String provider)
           
(package private)  java.lang.String getEncryptionAlgName(java.lang.String encryptionAlgOID)
          Return the digest encryption algorithm using one of the standard JCA string representations rather the the algorithm identifier (if possible).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

static final CMSSignedHelper INSTANCE

encryptionAlgs

private static final java.util.Map encryptionAlgs

digestAlgs

private static final java.util.Map digestAlgs

digestAliases

private static final java.util.Map digestAliases
Constructor Detail

CMSSignedHelper

CMSSignedHelper()
Method Detail

getDigestAlgName

java.lang.String getDigestAlgName(java.lang.String digestAlgOID)
Return the digest algorithm using one of the standard JCA string representations rather than the algorithm identifier (if possible).

Parameters:
digestAlgOID -
Returns:

getDigestAliases

java.lang.String[] getDigestAliases(java.lang.String algName)
Parameters:
algName -
Returns:

getEncryptionAlgName

java.lang.String getEncryptionAlgName(java.lang.String encryptionAlgOID)
Return the digest encryption algorithm using one of the standard JCA string representations rather the the algorithm identifier (if possible).

Parameters:
encryptionAlgOID -
Returns:

getDigestInstance

java.security.MessageDigest getDigestInstance(java.lang.String algorithm,
                                              java.lang.String provider)
                                        throws java.security.NoSuchProviderException,
                                               java.security.NoSuchAlgorithmException
Parameters:
algorithm -
provider -
Returns:
Throws:
java.security.NoSuchProviderException
java.security.NoSuchAlgorithmException

createDigestInstance

private java.security.MessageDigest createDigestInstance(java.lang.String algorithm,
                                                         java.lang.String provider)
                                                  throws java.security.NoSuchAlgorithmException,
                                                         java.security.NoSuchProviderException
Parameters:
algorithm -
provider -
Returns:
Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException

createAttributeStore

X509Store createAttributeStore(java.lang.String type,
                               java.lang.String provider,
                               ASN1Set certSet)
                         throws NoSuchStoreException,
                                java.security.NoSuchProviderException,
                                CMSException
Parameters:
type -
provider -
certSet -
Returns:
Throws:
NoSuchStoreException
java.security.NoSuchProviderException
CMSException

createCertStore

java.security.cert.CertStore createCertStore(java.lang.String type,
                                             java.lang.String provider,
                                             ASN1Set certSet,
                                             ASN1Set crlSet)
                                       throws java.security.NoSuchProviderException,
                                              CMSException,
                                              java.security.NoSuchAlgorithmException
Parameters:
type -
provider -
certSet -
crlSet -
Returns:
Throws:
java.security.NoSuchProviderException
CMSException
java.security.NoSuchAlgorithmException

addCertsFromSet

private void addCertsFromSet(java.util.List certs,
                             ASN1Set certSet,
                             java.lang.String provider)
                      throws java.security.NoSuchProviderException,
                             CMSException
Parameters:
certs -
certSet -
provider -
Throws:
java.security.NoSuchProviderException
CMSException

anyCertHasTypeOther

private boolean anyCertHasTypeOther()
Returns:

anyCertHasV1Attribute

private boolean anyCertHasV1Attribute()
Returns:

anyCertHasV2Attribute

private boolean anyCertHasV2Attribute()
Returns:

anyCrlHasTypeOther

private boolean anyCrlHasTypeOther()
Returns:


Copyright © 2013 Gamma Technologies. All Rights Reserved.