pub enum Backend {
X86ShaNi,
Aarch64Sha,
Portable,
}Expand description
Which implementation the sha1 / sha2 dependency selects for algo on this CPU.
Values mirror the cpufeatures dispatch inside those crates for the digests
Grit uses (SHA-1 and SHA-256). On x86_64, SHA-256 in sha2 0.11 only selects
SHA-NI or portable code (AVX2 is used for SHA-512, not SHA-256, so there is no
separate AVX2 backend variant here).
Variants§
X86ShaNi
x86_64 SHA-NI (sha target feature) — used for SHA-1 and SHA-256 when available.
Aarch64Sha
AArch64 SHA2 crypto extensions.
Portable
Portable software implementation.
Implementations§
Trait Implementations§
impl Copy for Backend
impl Eq for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more