auth static method

List<int> auth(
  1. List<int> key,
  2. List<int> data
)

Computes a Poly1305 authentication code (MAC) for the provided data using the given key.

Parameters:

  • key: Representing the key used for Poly1305 authentication.
  • data: Containing the data to be authenticated.

Implementation

static List<int> auth(List<int> key, List<int> data) {
  final Poly1305 h = Poly1305(key);
  h.update(data);
  final List<int> digest = h.digest();
  h.clean();
  return digest;
}