Crate streebog [] [src]

An implementation of the Streebog cryptographic hash function. It's officially known as GOST R 34.11-2012.

This implementation returns digest result using little-endian encoding in the form of array with least significant octets first, thus compared to specifications which uses big-endian result will have "reversed" order of octets.

Usage

An example of using Streebog256 and Streebog256 is:

use streebog::{Digest, Streebog256, Streebog512};

// create a hasher object, to use it do not forget to import `Digest` trait
let mut hasher = Streebog256::new();
// write input message
hasher.input(b"my message");
// read hash digest (it will consume hasher)
let result = hasher.result();

// same for Streebog512
let mut hasher = Streebog512::new();
hasher.input(b"my message");
let result = hasher.result();

Traits

Digest

The Digest trait specifies an interface common to digest functions

Type Definitions

Streebog256
Streebog512