org.mozilla.jss.pkcs7

Class EncryptedData

Implemented Interfaces:
ASN1Value

public class EncryptedData
extends java.lang.Object
implements ASN1Value

The PKCS #7 structure EncryptedData.

Nested Class Summary

static class
EncryptedData.Template
A Template for decoding EncryptedData items.

Field Summary

static INTEGER
DEFAULT_VERSION
The default version number.

Constructor Summary

EncryptedData(INTEGER version, EncryptedContentInfo encryptedContentInfo)
Creates a new EncryptedData.
EncryptedData(EncryptedContentInfo encryptedContentInfo)
Creates an EncryptedData with the default version.

Method Summary

void
encode(OutputStream ostream)
void
encode(Tag implicitTag, OutputStream ostream)
EncryptedContentInfo
getEncryptedContentInfo()
Tag
getTag()
static EncryptedData.Template
getTemplate()
INTEGER
getVersion()

Field Details

DEFAULT_VERSION

public static final INTEGER DEFAULT_VERSION
The default version number. This should always be used unless you really know what you are doing.

Constructor Details

EncryptedData

public EncryptedData(INTEGER version,
                     EncryptedContentInfo encryptedContentInfo)
Creates a new EncryptedData.
Parameters:
version - Should usually be DEFAULT_VERSION unless you are being very clever.

EncryptedData

public EncryptedData(EncryptedContentInfo encryptedContentInfo)
Creates an EncryptedData with the default version.

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicitTag,
                   OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

getEncryptedContentInfo

public EncryptedContentInfo getEncryptedContentInfo()

getTag

public Tag getTag()
Specified by:
getTag in interface ASN1Value

getTemplate

public static EncryptedData.Template getTemplate()

getVersion

public INTEGER getVersion()