whiteflag-js
    Preparing search index...

    Function encrypt

    • Function

      Encrypts a message based on the specified encryption method encrypt

      Parameters

      • message: Uint8Array<ArrayBuffer>

        the message to be encrypted

      • method: WfCryptoMethod

        the Whiteflag encryption method

      • key: CryptoKey

        the input key material for the encryption key

      • Optionaliv: Uint8Array<ArrayBuffer>

        the initialisation vector, if required for the method

      • version: v1 = WfVersion.v1

        the Whiteflag protocol version

      Returns Promise<Uint8Array<ArrayBufferLike>>

      v1-draft.7

      5.2.4 Message Encryption