tiny-crypto 0.1.3

The tiny-crypto crate is a collection of tools for common crypto algorithms, with APIs aimed to be simple to use.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// The Hex encoder
pub struct Hex;

impl super::Encoder for Hex {
    type Error = hex::FromHexError;

    fn to_text(&self, input: &[u8]) -> String {
        hex::encode(input)
    }

    fn from_text(&self, input: &str) -> Result<Vec<u8>, Self::Error> {
        hex::decode(input)
    }
}