Skip to content

Commit

Permalink
Update Crypto.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Jul 15, 2021
1 parent cdefaa8 commit bbe1751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/neo/Cryptography/Crypto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ public static bool VerifySignature(ReadOnlySpan<byte> message, ReadOnlySpan<byte
}
else
{
byte[] buffer = pubkey.EncodePoint(false);
ECCurve curve =
pubkey.Curve == ECC.ECCurve.Secp256r1 ? ECCurve.NamedCurves.nistP256 :
pubkey.Curve == ECC.ECCurve.Secp256k1 ? ECCurve.CreateFromFriendlyName("secP256k1") :
throw new NotSupportedException();
byte[] buffer = pubkey.EncodePoint(false);
using var ecdsa = ECDsa.Create(new ECParameters
{
Curve = curve,
Expand Down

0 comments on commit bbe1751

Please sign in to comment.