Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standalone verify function #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JaredCorduan
Copy link

hello! I hope you don't mind unsolicited PRs. :)

I found myself wanting to use the verify class method of KeyPair in the typical context where the signing key is not known. And it was simple enough to move the function out of the class (and allow the class method of the same name to call the standalone one).

Additionally, since it is no longer guaranteed that the nkey will be well-formed, validation is performed.

The existing tests cover the new standalone function without any changes.

The 'verify' class method of KeyPair is more typically used in the
context where the signing key is not known.
For this reason, the 'verify' method is now a standalone function which
takes an verifying (public) nkey, and the class method (of the same
name) calls the standalone function.
Additionally, since it is no longer guaranteed thatt the nkey will be
well-formed, validation is performed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant