diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-19 16:18:31 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-19 16:18:31 +0700 |
commit | c806df63e3df05eeeb9bf9523528930f5aea36ba (patch) | |
tree | cde87e1526ed04d69bc61b41364f41e8ff031506 /crypto/src/security | |
parent | Refactoring in Cms (diff) | |
download | BouncyCastle.NET-ed25519-c806df63e3df05eeeb9bf9523528930f5aea36ba.tar.xz |
Refactoring around SubjectPublicKeyInfo
Diffstat (limited to 'crypto/src/security')
-rw-r--r-- | crypto/src/security/PublicKeyFactory.cs | 8 |
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 |