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

Expose known algorithms #427

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Expose known algorithms #427

merged 1 commit into from
Jan 23, 2025

Conversation

puerco
Copy link
Contributor

@puerco puerco commented Jan 15, 2025

This PR adds a change to expose the known algorithms in a new type to let programs using the library know the standardized algorithm names. The type has a function to return the expected algorithm length that can be used to validate a hex representation of a hash.

/cc @marcelamelara

Signed-off-by: Adolfo García Veytia (Puerco) [email protected]

@puerco puerco requested a review from a team as a code owner January 15, 2025 23:43
@JustinCappos
Copy link
Contributor

JustinCappos commented Jan 16, 2025 via email

Copy link
Contributor

@marcelamelara marcelamelara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending this @puerco ! LGTM!

@marcelamelara
Copy link
Contributor

discussion of any proposal to add something akin to negotiation of which algorithms should be used for different operations...

@JustinCappos Fair point. FWIW, these changes aren't prescribing the use of any algorithm in any particular setting, only defining constants to refer to the spec-supported algorithms and their expected hash lengths.

This commit exposes the known algorithm list as its own type to
let programs using the library to use the standarized algorithm names.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
Copy link
Member

@pxp928 pxp928 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank You, this will keep things consistent!

@pxp928 pxp928 merged commit 2358a9c into in-toto:main Jan 23, 2025
3 checks passed
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.

5 participants