Skip to content

Commit c0dbef1

Browse files
committed
update hmac to digest v0.10
1 parent eaf68aa commit c0dbef1

17 files changed

+628
-226
lines changed

.github/workflows/hmac.yml

+1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ jobs:
5353
toolchain: ${{ matrix.rust }}
5454
override: true
5555
- run: cargo test --release --no-default-features
56+
- run: cargo test --release --features reset
5657
- run: cargo test --release

Cargo.lock

+44-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+9
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ members = [
55
"hmac",
66
"pmac",
77
]
8+
9+
[patch.crates-io]
10+
digest = { git = "https://github.com/RustCrypto/traits/", branch = "digest/v0.10" }
11+
block-buffer = { git = "https://github.com/RustCrypto/utils", branch = "block-buffer/v0.10" }
12+
md-5 = { git = "https://github.com/RustCrypto/hashes/", branch = "digest/v0.10.0-pre" }
13+
sha-1 = { git = "https://github.com/RustCrypto/hashes/", branch = "digest/v0.10.0-pre" }
14+
sha2 = { git = "https://github.com/RustCrypto/hashes/", branch = "digest/v0.10.0-pre" }
15+
streebog = { git = "https://github.com/RustCrypto/hashes/", branch = "digest/v0.10.0-pre" }
16+

README.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
# RustCrypto: Message Authentication Codes ![Rust Version][rustc-image] [![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link]
1+
# RustCrypto: Message Authentication Codes [![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link]
22

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

5-
## Crates
5+
## Supported Algorithms
66

7-
| Name | Algorithm | Crates.io | Documentation | Build Status |
8-
|--------|-----------|---------------|---------------|--------------|
9-
| `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)
10-
| `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)
11-
| `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)
12-
| `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)
7+
| Algorithm | Crate | Crates.io | Documentation | MSRV |
8+
|-----------|--------|:-------------:|:-------------:|:----:|
9+
| [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] |
10+
| [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] |
11+
| [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] |
12+
| [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] |
13+
14+
### Minimum Supported Rust Version (MSRV) Policy
15+
16+
MSRV bumps are considered breaking changes and will be performed only with minor version bump.
1317

1418
## License
1519

@@ -22,16 +26,15 @@ at your option.
2226

2327
### Contribution
2428

25-
Unless you explicitly state otherwise, any contribution intentionally submitted
26-
for inclusion in the work by you, as defined in the Apache-2.0 license
29+
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.
2730

2831
[//]: # (badges)
2932

30-
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
3133
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
3234
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260044-MACs
3335
[deps-image]: https://deps.rs/repo/github/RustCrypto/MACs/status.svg
3436
[deps-link]: https://deps.rs/repo/github/RustCrypto/MACs
37+
[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg
3538

3639
[//]: # (footnotes)
3740

hmac/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.12.0 (2021-11-25)
9+
### Changed
10+
- Bump `digest` crate dependency to v0.10 and replace `crypto-mac` with it ([#97])
11+
- Use a more efficient state representation by using block-level hash API. Introduce `SimpleHmac` as an alternative implementation. ([#97])
12+
13+
[#97]: https://github.com/RustCrypto/MACs/pull/97
14+
815
## 0.11.0 (2021-04-29)
916
### Changed
1017
- Bump `crypto-mac` crate dependency to v0.11 ([#73])

hmac/Cargo.toml

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hmac"
3-
version = "0.11.0"
3+
version = "0.12.0" # Also update html_root_url in lib.rs when bumping this
44
description = "Generic implementation of Hash-based Message Authentication Code (HMAC)"
55
authors = ["RustCrypto Developers"]
66
license = "MIT OR Apache-2.0"
@@ -12,14 +12,15 @@ readme = "README.md"
1212
edition = "2018"
1313

1414
[dependencies]
15-
crypto-mac = "0.11"
16-
digest = "0.9"
15+
digest = { version = "0.10", features = ["mac"] }
1716

1817
[dev-dependencies]
19-
crypto-mac = { version = "0.11", features = ["dev"] }
20-
md-5 = { version = "0.9", default-features = false }
21-
sha2 = { version = "0.9", default-features = false }
22-
streebog = { version = "0.9", default-features = false }
18+
digest = { version = "0.10", features = ["dev"] }
19+
md-5 = { version = "0.10", default-features = false }
20+
sha-1 = { version = "0.10", default-features = false }
21+
sha2 = { version = "0.10", default-features = false }
22+
streebog = { version = "0.10", default-features = false }
2323

2424
[features]
25-
std = ["crypto-mac/std"]
25+
std = ["digest/std"]
26+
reset = [] # Enable ability to reset HMAC instances

hmac/README.md

-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
![Apache2/MIT licensed][license-image]
66
![Rust Version][rustc-image]
77
[![Project Chat][chat-image]][chat-link]
8-
[![Build Status][build-image]][build-link]
98

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

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

5451
[//]: # (general links)
5552

0 commit comments

Comments
 (0)