usesuper::{
AlgorithmName, Buffer, BufferKindUser, FixedOutputCore, Reset, TruncSide, UpdateCore,
VariableOutputCore,
}; usecrate::HashMarker; #[cfg(feature = "mac")] usecrate::MacMarker; #[cfg(feature = "oid")] use const_oid::{AssociatedOid, ObjectIdentifier}; use core::{fmt, marker::PhantomData}; use crypto_common::{
generic_array::{ArrayLength, GenericArray},
typenum::{IsLess, IsLessOrEqual, Le, LeEq, NonZero, U256},
Block, BlockSizeUser, OutputSizeUser,
};
/// Dummy type used with [`CtVariableCoreWrapper`] in cases when /// resulting hash does not have a known OID. #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] pubstruct NoOid;
/// Wrapper around [`VariableOutputCore`] which selects output size /// at compile time. #[derive(Clone)] pubstruct CtVariableCoreWrapper<T, OutSize, O = NoOid> where
T: VariableOutputCore,
OutSize: ArrayLength<u8> + IsLessOrEqual<T::OutputSize>,
LeEq<OutSize, T::OutputSize>: NonZero,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
{
inner: T,
_out: PhantomData<(OutSize, O)>,
}
/// Implement dummy type with hidden docs which is used to "carry" hasher /// OID for [`CtVariableCoreWrapper`]. #[macro_export]
macro_rules! impl_oid_carrier {
($name:ident, $oid:literal) => { #[doc(hidden)] #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] pubstruct $name;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.