summary refs log tree commit diff
path: root/crypto/src/openpgp/PgpSignatureSubpacketVector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/openpgp/PgpSignatureSubpacketVector.cs')
-rw-r--r--crypto/src/openpgp/PgpSignatureSubpacketVector.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/src/openpgp/PgpSignatureSubpacketVector.cs b/crypto/src/openpgp/PgpSignatureSubpacketVector.cs
index 3dc96ea90..810f49c3e 100644
--- a/crypto/src/openpgp/PgpSignatureSubpacketVector.cs
+++ b/crypto/src/openpgp/PgpSignatureSubpacketVector.cs
@@ -9,6 +9,15 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
 	/// <remarks>Container for a list of signature subpackets.</remarks>
     public class PgpSignatureSubpacketVector
     {
+        public static PgpSignatureSubpacketVector FromSubpackets(SignatureSubpacket[] packets)
+        {
+            if (packets == null)
+            {
+                packets = new SignatureSubpacket[0];
+            }
+            return new PgpSignatureSubpacketVector(packets);
+        }
+
         private readonly SignatureSubpacket[] packets;
 
 		internal PgpSignatureSubpacketVector(