arrs 0.1.9

ARRS is a Rust API implementation of the Arweave client. It can be used to write command line, desktop, or web programs in Rust to use most features of Arweave, including creating, importing, and exporting wallets, checking balance, sending transactions, uploading files, etc..
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use openssl::sha;

/// Create a sha256 hash from a reference of bytes. Return bytes.
pub fn sha256(data: &[u8]) -> Vec<u8> {
    let mut hasher = sha::Sha256::new();
    hasher.update(data);
    hasher.finish().to_vec()
}

/// Create a sha384 hash from a reference of bytes. Return bytes.
pub fn sha384(data: &[u8]) -> Vec<u8> {
    let mut hasher = sha::Sha384::new();
    hasher.update(data);
    hasher.finish().to_vec()
}