Skip to content

Commit 491c77f

Browse files
committed
format code to nightly
1 parent 1a51471 commit 491c77f

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

crates/components/hmac-sha256/src/hmac.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
//! HMAC(m) = H((key' xor opad) || H((key' xor ipad) || m))
66
//!
77
//! * H - SHA256 hash function
8-
//! * key' - key padded with zero bytes to 64 bytes (we do not support longer keys)
8+
//! * key' - key padded with zero bytes to 64 bytes (we do not support longer
9+
//! keys)
910
//! * opad - 64 bytes of 0x5c
1011
//! * ipad - 64 bytes of 0x36
1112
//! * m - message
1213
//!
13-
//! This implementation computes HMAC-SHA256 using intermediate results `outer_partial` and `inner_local`.
14-
//! Then HMAC(m) = H(outer_partial || inner_local)
14+
//! This implementation computes HMAC-SHA256 using intermediate results
15+
//! `outer_partial` and `inner_local`. Then HMAC(m) = H(outer_partial ||
16+
//! inner_local)
1517
//!
1618
//! * `outer_partial` - key' xor opad
1719
//! * `inner_local` - H((key' xor ipad) || m)

crates/components/hmac-sha256/src/prf/function/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Provides [`PrfFunction`], for computing the TLS 1.2 PRF.
22
//!
3-
//! If the feature flag `local-inner-hash` is set, provides an implementation which computes
4-
//! some hashes locally.
3+
//! If the feature flag `local-inner-hash` is set, provides an implementation
4+
//! which computes some hashes locally.
55
66
use crate::{sha256::Sha256, PrfError};
77
use mpz_circuits::circuits::xor;
@@ -24,8 +24,8 @@ mod local;
2424
#[cfg(feature = "local-inner-hash")]
2525
pub(crate) use local::PrfFunction;
2626

27-
/// Depending on the provided `mask` computes and returns `outer_partial` or `inner_partial` for
28-
/// HMAC-SHA256.
27+
/// Depending on the provided `mask` computes and returns `outer_partial` or
28+
/// `inner_partial` for HMAC-SHA256.
2929
///
3030
/// # Arguments
3131
///

crates/components/hmac-sha256/src/sha256.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ impl Sha256 {
3030
/// # Arguments
3131
///
3232
/// * `state` - The starting state for the SHA256 compression function.
33-
/// * `processed` - The number of already processed bytes corresponding to `state`.
33+
/// * `processed` - The number of already processed bytes corresponding to
34+
/// `state`.
3435
pub(crate) fn set_state(&mut self, state: Array<U32, 8>, processed: usize) -> &mut Self {
3536
self.state = Some(state);
3637
self.processed = processed;
@@ -49,7 +50,8 @@ impl Sha256 {
4950

5051
/// Computes the padding for SHA256.
5152
///
52-
/// Padding is computed depending on [`Self::state`] and [`Self::processed`].
53+
/// Padding is computed depending on [`Self::state`] and
54+
/// [`Self::processed`].
5355
///
5456
/// # Arguments
5557
///

0 commit comments

Comments
 (0)