summary refs log tree commit diff
path: root/crypto/src/cms/CMSProcessableByteArray.cs
diff options
context:
space:
mode:
authorMW <megan@cryptoworkshop.com>2019-01-17 16:16:20 +1100
committerMW <megan@cryptoworkshop.com>2019-01-17 16:16:20 +1100
commit3d578b981aad94eaee07fa444dd11f9323026e94 (patch)
treed64141ae1163cafb69a4e3fc26ab90b538d98ef6 /crypto/src/cms/CMSProcessableByteArray.cs
parentMissing from previous commit (diff)
downloadBouncyCastle.NET-ed25519-3d578b981aad94eaee07fa444dd11f9323026e94.tar.xz
CMS ArchiveControl
Diffstat (limited to 'crypto/src/cms/CMSProcessableByteArray.cs')
-rw-r--r--crypto/src/cms/CMSProcessableByteArray.cs17
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);