`HashWriter` for `digest::Update` (ex. hmac)

Open Beginner friendly
#1,555 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Start by reading the existing digest_io::HashWriter implementation and how it uses the Digest trait; the issue identifies digest::Update as the needed interface after creation. Check how the crate tests HashWriter, then add coverage showing it works with an Update-only type such as HMAC. Done when that type can be used with the writer and the relevant tests pass.

Written by the indexing model from the issue text.

Description

digest_io::HashWriter requires the digest implement Digest. However, the hmac crate's Hmac and related types only implement Update (likely because they would be unable to sanely implement Digest::new, since they need a key to work with).

A version of HashWriter that works with Update instead of Digest would be help with those types, as Update is the only interface it really needs after creation.

Dominant language
Rust
Stars
688
Forks
177
Avg merge
2h 31m
Merged PRs (30d)
31

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RustCrypto/utils

All issues in RustCrypto/utils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.