Skip to content

Add broader validation methods (IsValidPublicKey without prefix, CompatibleKeyPair) #19

@mtmk

Description

@mtmk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions