Skip to content

Commit bbf49ad

Browse files
committed
rustfmt
1 parent 6a0aebe commit bbf49ad

7 files changed

Lines changed: 7 additions & 11 deletions

File tree

crypto/base64/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub enum Base64Error {
102102
/// The [Base64Decoder::do_update] method must not be called on a block that contains padding.
103103
/// If this error is returned, then the provided input has not been processed and the caller must instead
104104
/// pass the same input to [Base64Decoder::do_final]. Note that do_final() is tolerant of incomplete padding blocks,
105-
/// so even if an additional padding character is contained in the next chunk of input, do_final()
105+
/// so even if an additional padding character is contained in the next chunk of input, do_final()
106106
/// will still produce the correct output -- ie any additional chunks held by the caller can be discarded.
107107
PaddingEnconteredDuringDoUpdate,
108108

crypto/core/src/traits.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ pub trait StreamCipher<const KEY_LEN: usize, const INIT_DATA_LEN: usize>:
267267
) -> Result<usize, SymmetricCipherError>;
268268
}
269269

270-
271270
/// A hash function is a cryptographic primitive that takes an input of any length and produces a fixed-size output.
272271
/// Formally: `H: {0,1}^* -> {0,1}^n`.
273272
/// A cryptographic hash function will typically satisfy several security properties, including:

crypto/factory/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//! get the either the default algorithm or the default algorithm at the 128-bit or 256-bit security level.
2525
//! It also exposes [AlgorithmFactory::new] which can be used to create an instance of the algorithm
2626
//! by string name according to the string constants associated with the respective factory type.
27-
//!
27+
//!
2828
//! This crate compiles with STD; ie it is explicitly not tagged as `no_std` and it makes use of `Vec` and other
2929
//! dynamically-sized nice things.
3030

crypto/hkdf/tests/hkdf_tests.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,7 @@ mod hkdf_tests {
732732
use bouncycastle_hkdf::{SUSPENDED_HKDF_SHA256_STATE_LEN, SUSPENDED_HKDF_SHA512_STATE_LEN};
733733

734734
// HKDF is keyed by its salt: the salt is NOT serialized and is re-supplied on resume.
735-
let salt =
736-
KeyMaterial128::from_bytes_as_type(&DUMMY_SEED[..16], KeyType::MACKey).unwrap();
735+
let salt = KeyMaterial128::from_bytes_as_type(&DUMMY_SEED[..16], KeyType::MACKey).unwrap();
737736
let ikm = &DUMMY_SEED[16..64];
738737
let (part1, part2) = ikm.split_at(20);
739738

crypto/hmac/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ impl<
633633
macro_rules! impl_hmac_keygen {
634634
($hash:ty, $block_len:literal, $n:literal, $drbg:ty) => {
635635
impl HMAC<$hash, $block_len> {
636-
/// Generate a key of the appropriate length for the given HMAC
636+
/// Generate a key of the appropriate length for the given HMAC
637637
pub fn keygen() -> Result<KeyMaterial<$n>, RNGError> {
638638
let mut key = KeyMaterial::<$n>::new();
639639
let mut os_rng = <$drbg>::new_from_os();

crypto/hmac/tests/hmac_tests.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,7 @@ mod hmac_tests {
609609
use bouncycastle_core::traits::SuspendableKeyed;
610610
use bouncycastle_core_test_framework::suspendable_state::TestFrameworkSuspendableKeyedState;
611611

612-
let key =
613-
KeyMaterial256::from_bytes_as_type(&DUMMY_SEED[..32], KeyType::MACKey).unwrap();
612+
let key = KeyMaterial256::from_bytes_as_type(&DUMMY_SEED[..32], KeyType::MACKey).unwrap();
614613
let msg = b"Colorless green ideas sleep furiously";
615614

616615
// A helper that exercises the full round-trip for one HMAC variant. HMAC is keyed, so the
@@ -662,8 +661,7 @@ mod hmac_tests {
662661

663662
// test suspend / resume with a key larger than block size
664663
let long_key =
665-
KeyMaterial::<200>::from_bytes_as_type(&DUMMY_SEED[..200], KeyType::MACKey)
666-
.unwrap();
664+
KeyMaterial::<200>::from_bytes_as_type(&DUMMY_SEED[..200], KeyType::MACKey).unwrap();
667665
round_trip(HMAC_SHA256::new(&long_key).unwrap(), &long_key, msg);
668666
}
669667

crypto/utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! The functions contained here are not really intended to be used by end users, but you
44
//! are welcome to do so if you wish.
5-
//!
5+
//!
66
//! That said, beware that this crate is not necessarily documented to the same standard as other crates.
77
//! Since many of the contained helpers are security-critical (such as the constant time module),
88
//! we will prioritize fixing security bugs over maintaining a stable API for this crate.

0 commit comments

Comments
 (0)