neo
neo copied to clipboard
Refactor ECPoint
ECPoint is used in different parts of the code, however, in principle, in most of its use cases we could direct use pubkey as byte[] itself.
Maybe now with support to more cryptography standards there will be more use cases https://github.com/neo-project/neo/commit/1af936929093721ec274167829761ddba825c86c
However, for a more generic use the function public static ECPoint DecodePoint(ReadOnlySpan<byte> encoded, ECCurve curve) should use the This.Curve of the object.
Agree, this can better encapsulate the parsing process of publickey in functions such as signature verification, which is conducive to supporting more encryption standards.This is consistent with the principle of cohesion