Oracle Security Developer Tools CMS Java API Reference
10g Release 2 (10.1.2.0.2)

B15564-01


oracle.security.crypto.cms
Class ESSReceipt

java.lang.Object
  extended byoracle.security.crypto.cms.CMSContentInfo
      extended byoracle.security.crypto.cms.ESSReceipt


public class ESSReceipt
extends CMSContentInfo

This class encapulates a CMS object of content type Receipt.

It is used to send secure digital receipts as part of the S/MIME Enhanced Security Services (RFC-2634).


Constructor Summary
ESSReceipt()
Creates an empty ESSReceipt.
ESSReceipt(ASN1ObjectID contentType, byte[] signedContentIdentifier, byte[] originatorSignatureValue)
Creates a ESSReceipt.
ESSReceipt(java.io.InputStream is)
Creates a ESSReceipt, by reading a BER encoding from the given input stream.

Method Summary
protected byte[] getExposedContent()
Returns the contents octets of the DER encoding of the content field of this CMS object.
byte[] getOriginatorSignatureValue()
Return the signature value of the message that triggered the generation of this receipt.
ASN1ObjectID getReceiptContentType()
Returns the content type of the message that triggered the generation of this receipt.
byte[] getReceiptData()
Returns the encoded receipt.
byte[] getSignedContentIdentifier()
Returns the signed content identifier of the message that triggered the generation of this receipt.
void inputContent(java.io.InputStream is)
Initialize this object by reading the BER encoding from the specified input stream.
boolean isDetached()
Indicate if this object is detached.
protected void setExposedContent(byte[] expContent)
Returns the contents octets of the DER encoding of the content field of this CMS object.
java.lang.String toString()
Returns a brief text description of this object.
protected void update()
Clears the internal output cache.

Methods inherited from class oracle.security.crypto.cms.CMSContentInfo
computeDigest, contentTypeName, getContentType, input, inputInstance, isDegenerate, length, output

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ESSReceipt

public ESSReceipt()
Creates an empty ESSReceipt.

ESSReceipt

public ESSReceipt(ASN1ObjectID contentType,
                  byte[] signedContentIdentifier,
                  byte[] originatorSignatureValue)
Creates a ESSReceipt.
Parameters:
contentType - The content type identifier.
signedContentIdentifier - The signed content identifier.
originatorSignatureValue - The signature value.

ESSReceipt

public ESSReceipt(java.io.InputStream is)
           throws java.io.IOException
Creates a ESSReceipt, by reading a BER encoding from the given input stream.
Parameters:
is - The input stream.
Throws:
java.io.IOException - If the input is not correctly formatted or an I/O exception occurs while reading from the input stream.

Method Detail

setExposedContent

protected void setExposedContent(byte[] expContent)
Description copied from class: CMSContentInfo
Returns the contents octets of the DER encoding of the content field of this CMS object. The value returned is suitable for input to the "message-digesting" and "content-encryption" process of RFC-2630.
Specified by:
setExposedContent in class CMSContentInfo
Returns:
The contents octets or null for a detached CMS object.
See Also:
CMSContentInfo.isDetached()

getExposedContent

protected byte[] getExposedContent()
Description copied from class: CMSContentInfo
Returns the contents octets of the DER encoding of the content field of this CMS object. The value returned is suitable for input to the "message-digesting" and "content-encryption" process of RFC-2630.
Specified by:
getExposedContent in class CMSContentInfo
Returns:
The contents octets or null for a detached CMS object.
See Also:
CMSContentInfo.isDetached()

isDetached

public boolean isDetached()
Indicate if this object is detached.

This method returns true only for an empty ESSReceipt object which is not allowed by RFC-2634.

Specified by:
isDetached in class CMSContentInfo
Returns:
true if detached; false otherwise.
See Also:
CMSContentInfo.isDetached()

getReceiptContentType

public ASN1ObjectID getReceiptContentType()
Returns the content type of the message that triggered the generation of this receipt.
Returns:
The content type identifier.

getSignedContentIdentifier

public byte[] getSignedContentIdentifier()
Returns the signed content identifier of the message that triggered the generation of this receipt.
Returns:
The signed content identifier.

getOriginatorSignatureValue

public byte[] getOriginatorSignatureValue()
Return the signature value of the message that triggered the generation of this receipt.
Returns:
The original signature value.

getReceiptData

public byte[] getReceiptData()
                      throws java.io.IOException
Returns the encoded receipt.
Returns:
Byte Array containing the Receipt.
Throws:
java.io.IOException

toString

public java.lang.String toString()
Returns a brief text description of this object.
Returns:
A string description this object.

inputContent

public void inputContent(java.io.InputStream is)
                  throws java.io.IOException
Initialize this object by reading the BER encoding from the specified input stream.
Specified by:
inputContent in class CMSContentInfo
Parameters:
is - The input stream.
Throws:
java.io.IOException - An I/O error occurred or the object encoding was incorrect.

update

protected void update()
Clears the internal output cache. This method is called automatically if the object ever changes, so API users need not be concerned with it. Implementors of subclasses, however, do need to ensure that it gets called when appropriate.
Overrides:
update in class CMSContentInfo

Oracle Security Developer Tools CMS Java API Reference
10g Release 2 (10.1.2.0.2)

B15564-01


Copyright © 2005 , Oracle. All rights reserved.