safequard-api-for-react-native
    Preparing search index...

    Function safequard_dlms_auth_encrypt

    • Parameters

      • context: Uint8Array

        The buffer to the context.

      • aad: Uint8Array

        The buffer to the additional authenticated data.

      • message: Uint8Array

        The buffer to the message to encrypt.

      • encrypted_message: Uint8Array

        An allocated buffer for the encrypted message. Must have size encrypted_message + 12 + 16.

      Returns void

      Encrypt with authentication a message using AES-256-GCM.

      Encrypt and add authentication to a message with AES-256-GCM with a previously initialised context from safequard_dlms_key_agreement_encap() or safequard_dlms_key_agreement_decap().

      The caller should call safequard_mlkem768_finalise() when no further encryption or decryption is needed with this key, and then context can be freed.

      if encrypted_message has invalid size or context is invalid.