paragonie / sodium-plus

Developer-friendly libsodium interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Get assocData?

claudiojulioferraz opened this issue · comments

Hi! How can I get the value of assocData in a ciphertext?

Reference: https://github.com/paragonie/sodium-plus/blob/master/docs/SodiumPlus/AEAD.md

Automatically translated!

Additional data

These functions accept an optional, arbitrary long "additional data" parameter. These data are not present in the ciphertext, but are mixed in the computation of the authentication tag.

A typical use for these data is to authenticate version numbers, timestamps or monotonically increasing counters in order to discard previous messages and prevent replay attacks.

https://doc.libsodium.org/secret-key_cryptography/aead#additional-data