summary refs log tree commit diff
path: root/crypto/src/security
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-07-19 16:18:31 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-19 16:18:31 +0700
commitc806df63e3df05eeeb9bf9523528930f5aea36ba (patch)
treecde87e1526ed04d69bc61b41364f41e8ff031506 /crypto/src/security
parentRefactoring in Cms (diff)
downloadBouncyCastle.NET-ed25519-c806df63e3df05eeeb9bf9523528930f5aea36ba.tar.xz
Refactoring around SubjectPublicKeyInfo
Diffstat (limited to 'crypto/src/security')
-rw-r--r--crypto/src/security/PublicKeyFactory.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/security/PublicKeyFactory.cs b/crypto/src/security/PublicKeyFactory.cs
index d3ecef5c7..dd34b84ff 100644
--- a/crypto/src/security/PublicKeyFactory.cs
+++ b/crypto/src/security/PublicKeyFactory.cs
@@ -41,7 +41,7 @@ namespace Org.BouncyCastle.Security
         public static AsymmetricKeyParameter CreateKey(
             SubjectPublicKeyInfo keyInfo)
         {
-            AlgorithmIdentifier algID = keyInfo.AlgorithmID;
+            AlgorithmIdentifier algID = keyInfo.Algorithm;
             DerObjectIdentifier algOid = algID.Algorithm;
 
             // TODO See RSAUtil.isRsaOid in Java build
@@ -139,7 +139,7 @@ namespace Org.BouncyCastle.Security
                     x9 = new X9ECParameters((Asn1Sequence)para.Parameters);
                 }
 
-                Asn1OctetString key = new DerOctetString(keyInfo.PublicKeyData.GetBytes());
+                Asn1OctetString key = new DerOctetString(keyInfo.PublicKey.GetBytes());
                 X9ECPoint derQ = new X9ECPoint(x9.Curve, key);
                 ECPoint q = derQ.Point;
 
@@ -287,7 +287,7 @@ namespace Org.BouncyCastle.Security
              * TODO[RFC 8422]
              * - Require keyInfo.Algorithm.Parameters == null?
              */
-            return keyInfo.PublicKeyData.GetOctetsSpan();
+            return keyInfo.PublicKey.GetOctetsSpan();
         }
 #else
         private static byte[] GetRawKey(SubjectPublicKeyInfo keyInfo)
@@ -296,7 +296,7 @@ namespace Org.BouncyCastle.Security
              * TODO[RFC 8422]
              * - Require keyInfo.Algorithm.Parameters == null?
              */
-            return keyInfo.PublicKeyData.GetOctets();
+            return keyInfo.PublicKey.GetOctets();
         }
 #endif