Added public key method also for Span<byte>

This commit is contained in:
Thorsten Sommer 2020-01-03 20:33:10 +01:00
parent 9278224f44
commit 4ec458e0d3

View File

@ -120,5 +120,10 @@ namespace Ed25519
var bigA = Constants.B.ScalarMul(a);
return bigA.EncodePoint();
}
public static ReadOnlySpan<byte> ExtractPublicKey(this Span<byte> privateKey)
{
return new ReadOnlySpan<byte>(privateKey.ToArray()).ExtractPublicKey();
}
}
}