digest method

List<int> digest()

Computes and returns the Poly1305 message authentication code (MAC) for the current state.

Throws:

Implementation

List<int> digest() {
  if (_finished) {
    throw CryptoException.failed(
      "Poly1305.digest",
      reason: "State was finished.",
    );
  }
  final List<int> mac = List<int>.filled(16, 0);
  finish(mac);
  return mac;
}