cid_of

Function cid_of 

Source
pub fn cid_of(data: &[u8], algorithm: HashAlgorithm) -> Result<Cid>
Expand description

Computes the CID of data using the specified hash algorithm.

ยงExamples

use ipfrs_core::{utils::cid_of, HashAlgorithm};

let cid = cid_of(b"Hello, World!", HashAlgorithm::Sha256).unwrap();