From 5363f350887b1e5b5dd21a86f88c8af9d7fea6da Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:25 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/crypto-common/src/lib.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'vendor/crypto-common/src/lib.rs') diff --git a/vendor/crypto-common/src/lib.rs b/vendor/crypto-common/src/lib.rs index 187b1ac42..c49984cd2 100644 --- a/vendor/crypto-common/src/lib.rs +++ b/vendor/crypto-common/src/lib.rs @@ -4,8 +4,7 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![doc( html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg", - html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg", - html_root_url = "https://docs.rs/crypto-common/0.1.3" + html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg" )] #![forbid(unsafe_code)] #![warn(missing_docs, rust_2018_idioms)] @@ -26,10 +25,16 @@ use rand_core::{CryptoRng, RngCore}; /// Block on which [`BlockSizeUser`] implementors operate. pub type Block = GenericArray::BlockSize>; + +/// Parallel blocks on which [`ParBlocksSizeUser`] implementors operate. +pub type ParBlocks = GenericArray, ::ParBlocksSize>; + /// Output array of [`OutputSizeUser`] implementors. pub type Output = GenericArray::OutputSize>; + /// Key used by [`KeySizeUser`] implementors. pub type Key = GenericArray::KeySize>; + /// Initialization vector (nonce) used by [`IvSizeUser`] implementors. pub type Iv = GenericArray::IvSize>; @@ -52,6 +57,12 @@ impl BlockSizeUser for &mut T { type BlockSize = T::BlockSize; } +/// Types which can process blocks in parallel. +pub trait ParBlocksSizeUser: BlockSizeUser { + /// Number of blocks which can be processed in parallel. + type ParBlocksSize: ArrayLength>; +} + /// Types which return data with the given size. pub trait OutputSizeUser { /// Size of the output in bytes. -- cgit v1.2.3