digest method
Computes and returns the Poly1305 message authentication code (MAC) for the current state.
Throws:
- CryptoException if the Poly1305 instance was already finished before calling
digest.
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;
}