Skip to content

Misc cleanup (review by David) #104

Description

@ounsworth
  • Add the preference for squash merges to CONTRIBUTING.md
  • Make sure CLAUDE.md is pointing to CONTRIBUTING.md
  • Move all the name str's into the Factory crate.
  • Move the typedefs for HKDF_SHA256 and HKDF_SHA512 to the SHA2 crate.
    • Fix the docs ... probably that just means putting a docstring on those two typedefs that points back at the bouncycastle_hkdf crate docs.
    • Ditto for HMAC.

Activity

  1. ounsworth commented on Sep 8, 2026

    @ounsworth
    ContributorAuthor

    David had suggested:

    • Move all the name str's into the Factory crate.

    Currently, each algorithm struct is required to give itself a name in order to impl the Algorithm trait:

    /// Metadata about a cryptographic algorithm.
    pub trait Algorithm {
        /// String name for the algorithm, used consistently across the library.
        const ALG_NAME: &'static str;
        /// Maximum security strength supported by the algorithm.
        /// In other words, this algorithm can produce outputs up to this security strength,
        /// but may produce outputs with lower security strength, for example, if asked to truncate.
        const MAX_SECURITY_STRENGTH: SecurityStrength;
    }

    At the moment, I think Factory is the only thing that consumes these string names, but my intuition is to leave this the way it is because other things beyond Factory could use these in the future.

    So: Won't Fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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