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

Implement input validation for generateProof function #5

Open
adithyaakrishna opened this issue Oct 1, 2024 · 4 comments
Open

Implement input validation for generateProof function #5

adithyaakrishna opened this issue Oct 1, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@adithyaakrishna
Copy link
Contributor

The generateProof function in zk.ts could benefit from additional input validation to prevent potential errors and improve user experience.

Tasks:

  1. Add type checking for the opts parameter using TypeScript interfaces.
  2. Implement checks for required properties in the opts object.
  3. Validate the algorithm property against the list of supported algorithms.
  4. Add size checks for key, iv, and ciphertext based on the selected algorithm.
  5. Implement appropriate error handling and throw descriptive error messages for invalid inputs.

Adding input validation will help prevent runtime errors and provide clearer feedback to users when incorrect parameters are provided.

Contributors: Please note that by submitting a pull request, you are agreeing to accept and sign the Contributor License Agreement (CLA) found at https://github.com/reclaimprotocol/.github/blob/main/CLA.md

@adithyaakrishna adithyaakrishna added enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Oct 1, 2024
@aditya172926
Copy link

Hey @adithyaakrishna I would like work on this issue.

@adithyaakrishna
Copy link
Contributor Author

Assigned it to you @aditya172926 :)

@datmedevil17
Copy link

Hi @adithyaakrishna,
I'd like to work on this issue if no one else is working on it. Please assign it to me

@aditya172926
Copy link

Hi @adithyaakrishna,
I'd like to work on this issue if no one else is working on it. Please assign it to me

Can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants