rops 0.1.7

SOPS-like library in pure Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use generic_array::{ArrayLength, GenericArray};

pub trait Hasher: private::SealedHasher {
    type OutputSize: ArrayLength<u8>;

    fn new() -> Self;

    fn update(&mut self, input: impl AsRef<[u8]>);

    fn finalize(self) -> GenericArray<u8, Self::OutputSize>;
}

mod private {
    pub trait SealedHasher {}

    #[cfg(feature = "sha2")]
    impl SealedHasher for crate::SHA512 {}
}