XCMS Toolkit

com.cms.crypto
Class AbstractEnvelopedDataProcessor

java.lang.Object
  extended by com.cms.crypto.AbstractEnvelopedDataProcessor
Direct Known Subclasses:
EnvelopedDataForKeyAgreementWithMQV, EnvelopedDataForKeyTransport

public abstract class AbstractEnvelopedDataProcessor
extends java.lang.Object

Models the abstract concept of processing a value of the ASN.1 Cryptographic Message Syntax type EnvelopedData.

Version:
1.00 - 2006/01/26
Author:
support@phillipgriffin.com

Field Summary
protected  CipherAlgorithmFactory _cipherFactory
           
protected  Codec _codec
           
protected  ContentEncryptionAlgorithmIdentifier _contentEncryptionAlgorithmId
           
protected  EnvelopedData _envelopedData
           
protected  javax.crypto.SecretKey _secretKey
           
protected  CMSVersion _version
           
 
Constructor Summary
AbstractEnvelopedDataProcessor(CMSVersion version, Codec codec)
          Constructor for AbstractEnvelopedDataProcessor with ASN.1 type EnvelopedData syntax version and encoding rules parameters .
 
Method Summary
protected  Digest createCertificateHash(java.security.cert.Certificate certificate, DigestAlgorithmIdentifier digestAlgorithm)
           
protected  void encryptContent(javax.crypto.SecretKey contentEncryptionKey, DigestAlgorithmIdentifier dai, ContentEncryptionAlgorithmIdentifier ceai, byte[] payload)
           
 EnvelopedData getEnvelopedData()
          Gets a value of ASN.1 type getEnvelopedData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_version

protected CMSVersion _version

_codec

protected Codec _codec

_envelopedData

protected EnvelopedData _envelopedData

_secretKey

protected javax.crypto.SecretKey _secretKey

_contentEncryptionAlgorithmId

protected ContentEncryptionAlgorithmIdentifier _contentEncryptionAlgorithmId

_cipherFactory

protected CipherAlgorithmFactory _cipherFactory
Constructor Detail

AbstractEnvelopedDataProcessor

public AbstractEnvelopedDataProcessor(CMSVersion version,
                                      Codec codec)
                               throws CryptoException
Constructor for AbstractEnvelopedDataProcessor with ASN.1 type EnvelopedData syntax version and encoding rules parameters .

Parameters:
version - syntax version number
codec - ASN.1 encoding rules
Throws:
CryptoException
Method Detail

encryptContent

protected void encryptContent(javax.crypto.SecretKey contentEncryptionKey,
                              DigestAlgorithmIdentifier dai,
                              ContentEncryptionAlgorithmIdentifier ceai,
                              byte[] payload)
                       throws CryptoException
Throws:
CryptoException

getEnvelopedData

public EnvelopedData getEnvelopedData()
Gets a value of ASN.1 type getEnvelopedData.

Returns:
the current value of ASN.1 type EnvelopedData

createCertificateHash

protected Digest createCertificateHash(java.security.cert.Certificate certificate,
                                       DigestAlgorithmIdentifier digestAlgorithm)
                                throws CryptoException
Throws:
CryptoException

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.