miniproto.crypto.native.sha1_digest
miniproto.crypto.native.sha1_digest
Section titled “miniproto.crypto.native.sha1_digest”sha1_digest(data: bytes) -> bytesCompute a SHA-1 digest for MTProto compatibility.
Parameters:
- data (
bytes) – Input bytes to hash.
Returns:
bytes– The 20-byte digest.
This public hot path deliberately uses the C-backed stdlib fallback even when Rust is loaded because that is benchmarked faster for its small inputs. SHA-1 is exposed for MTProto protocol derivations, not as a general-purpose modern integrity recommendation.