[−][src]Module orion::hash
Hashing.
Use case:
orion::hash
can be used to hash some given data.
An example of this could be using hashes of files to ensure integrity. Meaning, checking if a file has been modified since the time the hash was recorded.
About:
- Uses BLAKE2b with an output size of 32 bytes (i.e BLAKE2b-256).
Parameters:
data
: The data to be hashed.
Exceptions:
An exception will be thrown if:
Security:
- This interface does not support supplying BLAKE2b with a secret key, and
the hashes retrived
from using
orion::hash
are therefore not suitable as MACs. - BLAKE2b is not suitable for password hashing. See
orion::pwhash
instead.
Example:
use orion::hash::{digest, Digest}; let hash: Digest = digest(b"Some data").unwrap();
Re-exports
pub use crate::hazardous::hash::blake2b::Digest; |
Functions
digest | Hashing using BLAKE2b-256. |