Struct exonum::crypto::HashStream [] [src]

pub struct HashStream(_);

This structure provides a possibility to calculate a SHA-256 hash digest for a stream of data.

Example

use exonum::crypto::HashStream;

let data: Vec<[u8; 5]> = vec![[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]];
let mut hash_stream = HashStream::new();
for chunk in data {
    hash_stream = hash_stream.update(&chunk);
}
let _ = hash_stream.hash();

Methods

impl HashStream
[src]

[src]

Creates a new instance of HashStream.

[src]

Processes a chunk of stream and returns a HashStream with the updated internal state.

[src]

Returns the hash of data supplied to the stream so far.

Trait Implementations

impl Debug for HashStream
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for HashStream
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for HashStream

impl Sync for HashStream