Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Rename types #10

Merged
merged 3 commits into from
May 14, 2024
Merged

Rename types #10

merged 3 commits into from
May 14, 2024

Conversation

tcharding
Copy link
Owner

@tcharding tcharding commented May 14, 2024

Done in two parts:

  • Rename the Hmac and HmacEngine types to Hash and HashEngine
  • Rename all the HashEngine types to plain old Engine

(Patch 1 is a trivial cleanup.)

Macros should use `$crate` in the path.
The `hmac` types are named differently to the other hash types. At this
stage there is not that much difference between them and it is not
immediately obvious why they get a different naming scheme.

As we do for the other hash types use `Hash` and `HashEngine` with the
expectation that user differentiate by using the module path.

With this patch applied users use `hmac::Hash` instead of `Hmac`.
@tcharding tcharding force-pushed the 05-14-rename branch 2 times, most recently from bf5393d to bad37a9 Compare May 14, 2024 08:19
Currently we use the same name for the hash engine trait and the structs
in each module. There is no real additional information in, for example,
`sha256::HashEngine` compared to `sha256::Engine`. Use the more terse
`Engine` and remove the overloading of the term.
@tcharding tcharding merged commit 7358988 into master May 14, 2024
11 checks passed
@tcharding tcharding deleted the 05-14-rename branch May 15, 2024 00:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant