Skip to content

miniproto_native::crypto::sha1_digest

  • Crate: miniproto_native
  • Rust visibility: restricted
  • Source: rust/miniproto/src/crypto.rs
  • Python exposure: miniproto._native.sha1_digest (confirmed from adjacent PyO3 attributes)
fn sha1_digest(py: _, data: _) -> _
  • py: The acquired GIL token used to detach a large hash operation.
  • data: Bytes to hash.
fn sha1_digest(py: Python<'_>, data: Vec<u8>) -> Vec<u8>

Defined in rust/miniproto/src/crypto.rs:101-103

Computes Python sha1_digest(data) and returns the 20-byte SHA-1 digest.

Large inputs are hashed with the GIL released.

  • py: The acquired GIL token used to detach a large hash operation.
  • data: Bytes to hash.