Skip to content

miniproto_native::transport::quick_ack_token

  • Rust visibility: restricted
  • Source: rust/miniproto/src/transport.rs
  • Python exposure: miniproto._native.quick_ack_token (confirmed from adjacent PyO3 attributes)
fn quick_ack_token(py: _, auth_key: _, encrypted_packet: _) -> _
  • py: Acquired Python token used to detach hashing for sufficiently large packets.
  • auth_key: 256-byte MTProto authorization key used by the quick-ACK hash schedule.
  • encrypted_packet: Full MTProto packet whose nonempty encrypted suffix is hashed.
fn quick_ack_token(py: Python<'_>, auth_key: Vec<u8>, encrypted_packet: Vec<u8>) -> PyResult<u32>

Defined in rust/miniproto/src/transport.rs:58-63

Computes the flagged quick-ACK token for Python quick_ack_token.

The 256-byte auth_key and nonempty encrypted portion of encrypted_packet are validated. Returns the token with the quick-ACK bit set or ValueError for invalid packet/key input.

  • py: Acquired Python token used to detach hashing for sufficiently large packets.
  • auth_key: 256-byte MTProto authorization key used by the quick-ACK hash schedule.
  • encrypted_packet: Full MTProto packet whose nonempty encrypted suffix is hashed.