Skip to content

Commit

Permalink
update hmac to digest v0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Dec 7, 2021
1 parent eaf68aa commit 49c543b
Show file tree
Hide file tree
Showing 16 changed files with 660 additions and 231 deletions.
1 change: 1 addition & 0 deletions .github/workflows/hmac.yml
Expand Up @@ -53,4 +53,5 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- run: cargo test --release --no-default-features
- run: cargo test --release --features reset
- run: cargo test --release
84 changes: 49 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 24 additions & 11 deletions README.md
@@ -1,15 +1,21 @@
# RustCrypto: Message Authentication Codes ![Rust Version][rustc-image] [![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link]
# RustCrypto: Message Authentication Codes

[![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link] ![Apache2/MIT licensed][license-image]

Collection of [Message Authentication Code][1] (MAC) algorithms written in pure Rust.

## Crates
## Supported Algorithms

| Algorithm | Crate | Crates.io | Documentation | MSRV |
|-----------|----------|:-------------:|:-------------:|:----:|
| [CMAC] | [`cmac`] | [![crates.io](https://img.shields.io/crates/v/cmac.svg)](https://crates.io/crates/cmac) | [![Documentation](https://docs.rs/cmac/badge.svg)](https://docs.rs/cmac) | ![MSRV 1.41][msrv-1.41] |
| [DAA] | [`daa`] | [![crates.io](https://img.shields.io/crates/v/daa.svg)](https://crates.io/crates/daa) | [![Documentation](https://docs.rs/daa/badge.svg)](https://docs.rs/daa) | ![MSRV 1.41][msrv-1.41] |
| [HMAC] | [`hmac`] | [![crates.io](https://img.shields.io/crates/v/hmac.svg)](https://crates.io/crates/hmac) | [![Documentation](https://docs.rs/hmac/badge.svg)](https://docs.rs/hmac) | ![MSRV 1.41][msrv-1.41] |
| [PMAC] | [`pmac`] | [![crates.io](https://img.shields.io/crates/v/pmac.svg)](https://crates.io/crates/pmac) | [![Documentation](https://docs.rs/pmac/badge.svg)](https://docs.rs/pmac) | ![MSRV 1.41][msrv-1.41] |

### Minimum Supported Rust Version (MSRV) Policy

| Name | Algorithm | Crates.io | Documentation | Build Status |
|--------|-----------|---------------|---------------|--------------|
| `cmac` | [CMAC] | [![crates.io](https://img.shields.io/crates/v/cmac.svg)](https://crates.io/crates/cmac) | [![Documentation](https://docs.rs/cmac/badge.svg)](https://docs.rs/cmac) | [![Build](https://github.com/RustCrypto/MACs/workflows/cmac/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/MACs/actions?query=workflow:cmac+branch:master)
| `daa` | [DAA] | [![crates.io](https://img.shields.io/crates/v/daa.svg)](https://crates.io/crates/daa) | [![Documentation](https://docs.rs/daa/badge.svg)](https://docs.rs/daa) | [![Build](https://github.com/RustCrypto/MACs/workflows/daa/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/MACs/actions?query=workflow:daa+branch:master)
| `hmac` | [HMAC] | [![crates.io](https://img.shields.io/crates/v/hmac.svg)](https://crates.io/crates/hmac) | [![Documentation](https://docs.rs/hmac/badge.svg)](https://docs.rs/hmac) | [![Build](https://github.com/RustCrypto/MACs/workflows/hmac/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/MACs/actions?query=workflow:hmac+branch:master)
| `pmac` | [PMAC] | [![crates.io](https://img.shields.io/crates/v/pmac.svg)](https://crates.io/crates/pmac) | [![Documentation](https://docs.rs/pmac/badge.svg)](https://docs.rs/pmac) | [![Build](https://github.com/RustCrypto/MACs/workflows/pmac/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/MACs/actions?query=workflow:pmac+branch:master)
MSRV bumps are considered breaking changes and will be performed only with minor version bump.

## License

Expand All @@ -22,16 +28,23 @@ at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

[//]: # (badges)

[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260044-MACs
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[deps-image]: https://deps.rs/repo/github/RustCrypto/MACs/status.svg
[deps-link]: https://deps.rs/repo/github/RustCrypto/MACs
[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg

[//]: # (crates)

[`cmac`]: ./cmac
[`daa`]: ./daa
[`hmac`]: ./hmac
[`pmac`]: ./pmac

[//]: # (footnotes)

Expand Down
10 changes: 10 additions & 0 deletions hmac/CHANGELOG.md
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.12.0 (2021-12-07)
### Changed
- Bump `digest` crate dependency to v0.10 and remove `crypto-mac` ([#97])
- Use a more efficient state representation by using block-level hash API ([#97])

### Added
- `SimpleHmac` as a less constrained alternative to `Hmac` ([#97])

[#97]: https://github.com/RustCrypto/MACs/pull/97

## 0.11.0 (2021-04-29)
### Changed
- Bump `crypto-mac` crate dependency to v0.11 ([#73])
Expand Down
18 changes: 10 additions & 8 deletions hmac/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "hmac"
version = "0.11.0"
version = "0.12.0" # Also update html_root_url in lib.rs when bumping this
description = "Generic implementation of Hash-based Message Authentication Code (HMAC)"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
Expand All @@ -12,14 +12,16 @@ readme = "README.md"
edition = "2018"

[dependencies]
crypto-mac = "0.11"
digest = "0.9"
digest = { version = "0.10", features = ["mac"] }

[dev-dependencies]
crypto-mac = { version = "0.11", features = ["dev"] }
md-5 = { version = "0.9", default-features = false }
sha2 = { version = "0.9", default-features = false }
streebog = { version = "0.9", default-features = false }
digest = { version = "0.10", features = ["dev"] }
md-5 = { version = "0.10", default-features = false }
sha-1 = { version = "0.10", default-features = false }
sha2 = { version = "0.10", default-features = false }
streebog = { version = "0.10", default-features = false }
hex-literal = "0.2"

[features]
std = ["crypto-mac/std"]
std = ["digest/std"]
reset = [] # Enable ability to reset HMAC instances
3 changes: 0 additions & 3 deletions hmac/README.md
Expand Up @@ -5,7 +5,6 @@
![Apache2/MIT licensed][license-image]
![Rust Version][rustc-image]
[![Project Chat][chat-image]][chat-link]
[![Build Status][build-image]][build-link]

Pure Rust implementation of the [Hash-based Message Authentication Code (HMAC)][1].

Expand Down Expand Up @@ -48,8 +47,6 @@ dual licensed as above, without any additional terms or conditions.
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260044-MACs
[build-image]: https://github.com/RustCrypto/MACs/workflows/hmac/badge.svg?branch=master&event=push
[build-link]: https://github.com/RustCrypto/MACs/actions?query=workflow%3Ahmac

[//]: # (general links)

Expand Down

0 comments on commit 49c543b

Please sign in to comment.