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

Imple a sugar-coating method (try-await-catch) for the verify function that can throw VerificationError #39

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shimastripe
Copy link
Contributor

@shimastripe shimastripe commented Mar 17, 2024

WHY

  • SignedDataVerifier's verify is very useful for easy data falsification verification.
    • However, VerificationError is not an Error, but only a data representation of Enum, so we have to switch must be made based on the results received.
  • I would like to be able to write this in a standard expression using Swift's try-await as well

WHAT

  • VerificationError conforms to Error
  • I implemented wrapper methods that converted an existing method to try-await syntax. This is done in this form for backward compatibility as well.

Sorry for the frequent PRs. If you have any reason not to want to make VerificationError an Error, please close this PR.

@shimastripe shimastripe force-pushed the feature/verification-error-throw branch from ad61e0f to 11683ef Compare March 17, 2024 08:06
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