diff options
author | MW <megan@cryptoworkshop.com> | 2019-01-17 16:16:20 +1100 |
---|---|---|
committer | MW <megan@cryptoworkshop.com> | 2019-01-17 16:16:20 +1100 |
commit | 3d578b981aad94eaee07fa444dd11f9323026e94 (patch) | |
tree | d64141ae1163cafb69a4e3fc26ab90b538d98ef6 /crypto/src/cms/CMSProcessableByteArray.cs | |
parent | Missing from previous commit (diff) | |
download | BouncyCastle.NET-ed25519-3d578b981aad94eaee07fa444dd11f9323026e94.tar.xz |
CMS ArchiveControl
Diffstat (limited to 'crypto/src/cms/CMSProcessableByteArray.cs')
-rw-r--r-- | crypto/src/cms/CMSProcessableByteArray.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/crypto/src/cms/CMSProcessableByteArray.cs b/crypto/src/cms/CMSProcessableByteArray.cs index a6ab9b6a2..b09935dd8 100644 --- a/crypto/src/cms/CMSProcessableByteArray.cs +++ b/crypto/src/cms/CMSProcessableByteArray.cs @@ -1,5 +1,7 @@ using System; using System.IO; +using Org.BouncyCastle.Asn1; +using Org.BouncyCastle.Asn1.Cms; namespace Org.BouncyCastle.Cms { @@ -9,13 +11,26 @@ namespace Org.BouncyCastle.Cms public class CmsProcessableByteArray : CmsProcessable, CmsReadable { + private readonly DerObjectIdentifier type; private readonly byte[] bytes; public CmsProcessableByteArray(byte[] bytes) - { + { + type = CmsObjectIdentifiers.Data; this.bytes = bytes; } + public CmsProcessableByteArray(DerObjectIdentifier type, byte[] bytes) + { + this.bytes = bytes; + this.type = type; + } + + public DerObjectIdentifier Type + { + get { return type; } + } + public virtual Stream GetInputStream() { return new MemoryStream(bytes, false); |