miniproto_native::crypto::mtproto_message_key
Provenance
Section titled “Provenance”- Crate:
miniproto_native - Rust visibility:
restricted - Source:
rust/miniproto/src/crypto.rs - Python exposure:
miniproto._native.mtproto_message_key(confirmed from adjacent PyO3 attributes)
Signature
Section titled “Signature”fn mtproto_message_key(py: _, auth_key: _, plaintext_with_padding: _, client_to_server: bool) -> _Arguments
Section titled “Arguments”py: The acquired GIL token used to detach a large hash operation.auth_key: The 256-byte MTProto authorization key.plaintext_with_padding: Block-aligned inner plaintext that contributes to the message key.client_to_server: Selects the directional MTProto key offset.
cargo-docs-md rendering
Section titled “cargo-docs-md rendering”mtproto_message_key
Section titled “mtproto_message_key”fn mtproto_message_key(py: Python<'_>, auth_key: Vec<u8>, plaintext_with_padding: Vec<u8>, client_to_server: bool) -> PyResult<Vec<u8>>Defined in rust/miniproto/src/crypto.rs:142-157
Computes Python mtproto_message_key for padded plaintext and one MTProto direction.
Returns a 16-byte message key; rejects an invalid authorization key and releases the GIL for large inputs.
Arguments
Section titled “Arguments”py: The acquired GIL token used to detach a large hash operation.auth_key: The 256-byte MTProto authorization key.plaintext_with_padding: Block-aligned inner plaintext that contributes to the message key.client_to_server: Selects the directional MTProto key offset.