Table of Contents

Class CmsSignedData

Namespace
Org.BouncyCastle.Cms
Assembly
BouncyCastle.Cryptography.dll
public class CmsSignedData
Inheritance
CmsSignedData
Inherited Members

Constructors

CmsSignedData(ContentInfo)

public CmsSignedData(ContentInfo sigData)

Parameters

sigData ContentInfo

CmsSignedData(CmsProcessable, ContentInfo)

public CmsSignedData(CmsProcessable signedContent, ContentInfo sigData)

Parameters

signedContent CmsProcessable
sigData ContentInfo

CmsSignedData(CmsProcessable, byte[])

public CmsSignedData(CmsProcessable signedContent, byte[] sigBlock)

Parameters

signedContent CmsProcessable
sigBlock byte[]

CmsSignedData(CmsProcessable, Stream)

public CmsSignedData(CmsProcessable signedContent, Stream sigData)

Parameters

signedContent CmsProcessable
sigData Stream

CmsSignedData(byte[])

public CmsSignedData(byte[] sigBlock)

Parameters

sigBlock byte[]

CmsSignedData(IDictionary<string, byte[]>, ContentInfo)

public CmsSignedData(IDictionary<string, byte[]> hashes, ContentInfo sigData)

Parameters

hashes IDictionary<string, byte[]>
sigData ContentInfo

CmsSignedData(IDictionary<string, byte[]>, byte[])

public CmsSignedData(IDictionary<string, byte[]> hashes, byte[] sigBlock)

Parameters

hashes IDictionary<string, byte[]>
sigBlock byte[]

CmsSignedData(Stream)

public CmsSignedData(Stream sigData)

Parameters

sigData Stream

Properties

ContentInfo

public ContentInfo ContentInfo { get; }

Property Value

ContentInfo

SignedContent

public CmsProcessable SignedContent { get; }

Property Value

CmsProcessable

SignedContentType

Return the DerObjectIdentifier associated with the encapsulated content info structure carried in the signed data.

public DerObjectIdentifier SignedContentType { get; }

Property Value

DerObjectIdentifier

SignedData

public SignedData SignedData { get; }

Property Value

SignedData

Version

Return the version number for this object.

public int Version { get; }

Property Value

int

Methods

AddDigestAlgorithm(CmsSignedData, AlgorithmIdentifier)

public static CmsSignedData AddDigestAlgorithm(CmsSignedData signedData, AlgorithmIdentifier digestAlgorithm)

Parameters

signedData CmsSignedData
digestAlgorithm AlgorithmIdentifier

Returns

CmsSignedData

AddDigestAlgorithm(CmsSignedData, AlgorithmIdentifier, IDigestAlgorithmFinder)

public static CmsSignedData AddDigestAlgorithm(CmsSignedData signedData, AlgorithmIdentifier digestAlgorithm, IDigestAlgorithmFinder digestAlgorithmFinder)

Parameters

signedData CmsSignedData
digestAlgorithm AlgorithmIdentifier
digestAlgorithmFinder IDigestAlgorithmFinder

Returns

CmsSignedData

GetAttributeCertificates()

public IStore<X509V2AttributeCertificate> GetAttributeCertificates()

Returns

IStore<X509V2AttributeCertificate>

GetCertificates()

public IStore<X509Certificate> GetCertificates()

Returns

IStore<X509Certificate>

GetCrls()

public IStore<X509Crl> GetCrls()

Returns

IStore<X509Crl>

GetDigestAlgorithmIDs()

[Obsolete("Use 'GetDigestAlgorithms' instead")]
public ISet<AlgorithmIdentifier> GetDigestAlgorithmIDs()

Returns

ISet<AlgorithmIdentifier>

Remarks

Does not preserve the original order in SignedData.DigestAlgorithms.

GetDigestAlgorithms()

public IEnumerable<AlgorithmIdentifier> GetDigestAlgorithms()

Returns

IEnumerable<AlgorithmIdentifier>

GetEncoded()

public byte[] GetEncoded()

Returns

byte[]

GetEncoded(string)

public byte[] GetEncoded(string encoding)

Parameters

encoding string

Returns

byte[]

GetOtherRevInfos(DerObjectIdentifier)

public IStore<Asn1Encodable> GetOtherRevInfos(DerObjectIdentifier otherRevInfoFormat)

Parameters

otherRevInfoFormat DerObjectIdentifier

Returns

IStore<Asn1Encodable>

GetSignerInfos()

public SignerInformationStore GetSignerInfos()

Returns

SignerInformationStore

ReplaceCertificatesAndCrls(CmsSignedData, IStore<X509Certificate>, IStore<X509Crl>)

public static CmsSignedData ReplaceCertificatesAndCrls(CmsSignedData signedData, IStore<X509Certificate> x509Certs, IStore<X509Crl> x509Crls)

Parameters

signedData CmsSignedData
x509Certs IStore<X509Certificate>
x509Crls IStore<X509Crl>

Returns

CmsSignedData

ReplaceCertificatesAndCrls(CmsSignedData, IStore<X509Certificate>, IStore<X509Crl>, IStore<X509V2AttributeCertificate>)

public static CmsSignedData ReplaceCertificatesAndCrls(CmsSignedData signedData, IStore<X509Certificate> x509Certs, IStore<X509Crl> x509Crls, IStore<X509V2AttributeCertificate> x509AttrCerts)

Parameters

signedData CmsSignedData
x509Certs IStore<X509Certificate>
x509Crls IStore<X509Crl>
x509AttrCerts IStore<X509V2AttributeCertificate>

Returns

CmsSignedData

ReplaceCertificatesAndRevocations(CmsSignedData, IStore<X509Certificate>, IStore<X509Crl>, IStore<X509V2AttributeCertificate>, IStore<OtherRevocationInfoFormat>)

public static CmsSignedData ReplaceCertificatesAndRevocations(CmsSignedData signedData, IStore<X509Certificate> x509Certs, IStore<X509Crl> x509Crls, IStore<X509V2AttributeCertificate> x509AttrCerts, IStore<OtherRevocationInfoFormat> otherRevocationInfos)

Parameters

signedData CmsSignedData
x509Certs IStore<X509Certificate>
x509Crls IStore<X509Crl>
x509AttrCerts IStore<X509V2AttributeCertificate>
otherRevocationInfos IStore<OtherRevocationInfoFormat>

Returns

CmsSignedData

ReplaceSigners(CmsSignedData, SignerInformationStore)

public static CmsSignedData ReplaceSigners(CmsSignedData signedData, SignerInformationStore signerInformationStore)

Parameters

signedData CmsSignedData
signerInformationStore SignerInformationStore

Returns

CmsSignedData

ReplaceSigners(CmsSignedData, SignerInformationStore, IDigestAlgorithmFinder)

public static CmsSignedData ReplaceSigners(CmsSignedData signedData, SignerInformationStore signerInformationStore, IDigestAlgorithmFinder digestAlgorithmFinder)

Parameters

signedData CmsSignedData
signerInformationStore SignerInformationStore
digestAlgorithmFinder IDigestAlgorithmFinder

Returns

CmsSignedData