Skip to content

Commit e8ca014

Browse files
authored
update hmac to digest v0.10 (#97)
1 parent eaf68aa commit e8ca014

16 files changed

+660
-231
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

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

README.md

+24-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
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
2+
3+
[![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link] ![Apache2/MIT licensed][license-image]
24

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

5-
## Crates
7+
## Supported Algorithms
8+
9+
| Algorithm | Crate | Crates.io | Documentation | MSRV |
10+
|-----------|----------|:-------------:|:-------------:|:----:|
11+
| [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] |
12+
| [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] |
13+
| [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] |
14+
| [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] |
15+
16+
### Minimum Supported Rust Version (MSRV) Policy
617

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)
18+
MSRV bumps are considered breaking changes and will be performed only with minor version bump.
1319

1420
## License
1521

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

2329
### Contribution
2430

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
31+
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.
2732

2833
[//]: # (badges)
2934

30-
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
3135
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
3236
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260044-MACs
37+
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
3338
[deps-image]: https://deps.rs/repo/github/RustCrypto/MACs/status.svg
3439
[deps-link]: https://deps.rs/repo/github/RustCrypto/MACs
40+
[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg
41+
42+
[//]: # (crates)
43+
44+
[`cmac`]: ./cmac
45+
[`daa`]: ./daa
46+
[`hmac`]: ./hmac
47+
[`pmac`]: ./pmac
3548

3649
[//]: # (footnotes)
3750

hmac/CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ 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-12-07)
9+
### Changed
10+
- Bump `digest` crate dependency to v0.10 and remove `crypto-mac` ([#97])
11+
- Use a more efficient state representation by using block-level hash API ([#97])
12+
13+
### Added
14+
- `SimpleHmac` as a less constrained alternative to `Hmac` ([#97])
15+
16+
[#97]: https://github.com/RustCrypto/MACs/pull/97
17+
818
## 0.11.0 (2021-04-29)
919
### Changed
1020
- Bump `crypto-mac` crate dependency to v0.11 ([#73])

hmac/Cargo.toml

+10-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,16 @@ 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 }
23+
hex-literal = "0.2"
2324

2425
[features]
25-
std = ["crypto-mac/std"]
26+
std = ["digest/std"]
27+
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)