Summary
The Go implementation has richer validation utilities not yet in .NET:
IsValidPublicKey(src string) — validate any public key without specifying a prefix
- Type-specific validators:
IsValidPublicUserKey(), IsValidPublicAccountKey(), etc.
CompatibleKeyPair(kp, expected...) — check a KeyPair matches one of several expected types
The .NET library only has IsValidPublicKey(prefix, publicKey) which requires specifying the prefix upfront.
Approach
Add static validation methods to KeyPair. The type-specific validators are sugar over the existing method. IsValidPublicKey without prefix and CompatibleKeyPair are new functionality. Purely additive.
Summary
The Go implementation has richer validation utilities not yet in .NET:
IsValidPublicKey(src string)— validate any public key without specifying a prefixIsValidPublicUserKey(),IsValidPublicAccountKey(), etc.CompatibleKeyPair(kp, expected...)— check a KeyPair matches one of several expected typesThe .NET library only has
IsValidPublicKey(prefix, publicKey)which requires specifying the prefix upfront.Approach
Add static validation methods to
KeyPair. The type-specific validators are sugar over the existing method.IsValidPublicKeywithout prefix andCompatibleKeyPairare new functionality. Purely additive.