updated documentation

This commit is contained in:
Frederik Palmø 2022-09-20 14:19:20 +02:00
parent f1958765bc
commit 2baa7ab62a
4 changed files with 9 additions and 9 deletions

View File

@ -43,9 +43,9 @@ fn checksum(message: impl AsRef<[u8]>) -> Vec<u8> {
message
}
/// Computes the MD2 digest of the input bytes.
/// Computes the MD2 hash value (digest) of the input bytes.
///
/// Returns a `Digest<16>` which implements `Display` in order to get at hexadecimal-string representation.
/// Returns a 16-byte `Digest` which implements `Display` in order to get at hexadecimal-string representation.
///
/// # Examples
///

View File

@ -65,9 +65,9 @@ fn step([mut a, b, c, d]: [u32; 4], words: &[u32], i: usize) -> [u32; 4] {
[a, b, c, d]
}
/// Computes the MD4 digest of the input bytes.
/// Computes the MD4 hash value (digest) of the input bytes.
///
/// Returns a `Digest<16>` which implements `Display` in order to get at hexadecimal-string representation.
/// Returns a 16-byte `Digest` which implements `Display` in order to get at hexadecimal-string representation.
///
/// # Examples
///

View File

@ -54,9 +54,9 @@ fn step([mut a, b, c, d]: [u32; 4], words: &[u32], index: usize) -> [u32; 4] {
[a, b, c, d]
}
/// Computes the MD5 digest of the input bytes.
/// Computes the MD5 hash value (digest) of the input bytes.
///
/// Returns a `Digest<16>` which implements `Display` in order to get at hexadecimal-string representation.
/// Returns a 16-byte `Digest` which implements `Display` in order to get at hexadecimal-string representation.
///
/// # Examples
///

View File

@ -1,6 +1,6 @@
use crate::hash::{bytes_to_words_be, words_to_bytes_be, Digest};
// based on RFC3174, US Secure Hash Algorithm 1
// based on RFC3174, Secure Hash Algorithm 1
// round functions
const F1: fn(u32, u32, u32) -> u32 = |x, y, z| (x & y) | ((!x) & z);
@ -61,9 +61,9 @@ fn step([a, b, c, d, e]: [u32; 5], words: &[u32], i: usize) -> [u32; 5] {
]
}
/// Computes the SHA1 digest of the input bytes.
/// Computes the SHA1 hash value (digest) of the input bytes.
///
/// Returns a 20-byte long `Digest` which implements `Display` in order to get at hexadecimal-string representation.
/// Returns a 20-byte `Digest` which implements `Display` in order to get at hexadecimal-string representation.
///
/// # Examples
///