• Internal

    Proceed with Symmetric encryption of the data as per 26/WAKU-PAYLOAD.

    Parameters

    • data: Uint8Array

      The data to encrypt, expected to be flags | payload-length | payload | [signature].

    • key: string | Uint8Array

      The key to use for encryption.

    Returns Promise<Uint8Array>

    The decrypted data, cipherText | tag | iv and can be set to WakuMessage.payload.