Function generateKeyAndIvFromNonce

  • Generate AES key and IV from nonces as defined by MTProto. Used in authorization flow.

    Parameters

    • crypto: ICryptoProvider

      Crypto provider

    • serverNonce: Uint8Array

      Server nonce

    • newNonce: Uint8Array

      New nonce

    Returns [Uint8Array, Uint8Array]

    Tuple: [key, iv]