Skip to content

miniproto.auth.key_exchange.compute_new_nonce_hash

miniproto.auth.key_exchange.compute_new_nonce_hash

Section titled “miniproto.auth.key_exchange.compute_new_nonce_hash”
compute_new_nonce_hash(new_nonce: int, auth_key: bytes, number: int) -> int

Compute Telegram’s keyed new-nonce confirmation hash number 1, 2, or 3.

Parameters:

  • new_nonce (int) – Fresh client nonce from the active exchange.
  • auth_key (bytes) – Newly derived MTProto authorization key bytes.
  • number (int) – Telegram confirmation-hash selector, restricted to 1, 2, or 3.

Raises:

  • ValueError – If number is not a Telegram-defined confirmation index.