Module cryptoxide::hashing::sha1

source ·
Expand description

An implementation of the SHA-1 cryptographic hash algorithm.

it is however discouraged to use this algorithm in any application as is, as this is not considered secured anymore. the algorithm is deprecated since 2011, and chosen prefix attack are practical.

However the hash function is still pervasively used in other contextes where security is still ok (e.g. hmac-sha1), so on this basis is available here.

Example

use cryptoxide::hashing::sha1;

let digest = sha1::Context::new().update(b"hello world").finalize();

Structs

Structure representing the state of a Sha1 computation
Sha1 Algorithm

Functions

Emulates llvm.x86.sha1rnds4 intrinsic. Performs 4 rounds of the message block digest.
Not an intrinsic, but gets the first element of a vector.
Not an intrinsic, but adds a word to the first element of a vector.
Emulates llvm.x86.sha1nexte intrinsic.
Performs 4 rounds of the message schedule update.