summary refs log tree commit diff
path: root/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/x509/SubjectPublicKeyInfo.cs')
-rw-r--r--crypto/src/asn1/x509/SubjectPublicKeyInfo.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs b/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs
index 477329b7e..ae44a451f 100644
--- a/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs
+++ b/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs
@@ -66,6 +66,18 @@ namespace Org.BouncyCastle.Asn1.X509
 			get { return algID; }
         }
 
+        /**
+         * for when the public key is an encoded object - if the bitstring
+         * can't be decoded this routine raises an IOException.
+         *
+         * @exception IOException - if the bit string doesn't represent a Der
+         * encoded object.
+         */
+        public Asn1Object ParsePublicKey()
+        {
+            return Asn1Object.FromByteArray(keyData.GetOctets());
+        }
+
 		/**
          * for when the public key is an encoded object - if the bitstring
          * can't be decoded this routine raises an IOException.
@@ -73,6 +85,7 @@ namespace Org.BouncyCastle.Asn1.X509
          * @exception IOException - if the bit string doesn't represent a Der
          * encoded object.
          */
+        [Obsolete("Use 'ParsePublicKey' instead")]
         public Asn1Object GetPublicKey()
         {
 			return Asn1Object.FromByteArray(keyData.GetOctets());