Skip to content

miniproto_native::transport::quick_ack_token

  • Crate: miniproto_native
  • 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(auth_key: &[u8], encrypted_packet: &[u8]) -> _
  • 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(auth_key: &[u8], encrypted_packet: &[u8]) -> PyResult<u32>

Defined in rust/miniproto/src/transport.rs:55-68

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.

  • 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.