Crate ion_hash[][src]

Implements the Ion Hash specification

Examples

use ion_rs::value::reader::{self, ElementReader};
use ion_rs::result::IonResult;

  let loader = reader::element_reader();
  let elem = loader.iterate_over(b"\"hello world\"")?.next().unwrap()?;
  let digest = ion_hash::sha256(&elem);
  println!("{:?}", digest);

Structs

IonHasher

Provides Ion hash over arbitrary Element instances with a given Digest algorithm.

Functions

sha256

Utility to hash an Element using SHA-256 as the hash function.