hermitdb 0.1.0

A private decentralized database replicated over Git (or any other distributed log)
1
2
3
4
5
6
7
8
9
10
11
extern crate data_encoding;
use error::{Result, Error};
    
pub fn decode(encoded: &str) -> Result<Vec<u8>> {
    data_encoding::HEXLOWER.decode(encoded.as_bytes())
        .map_err(Error::DataEncodingDecode)
}

pub fn encode(data: &[u8]) -> String {
    data_encoding::HEXLOWER.encode(data)
}