hmacSha512<T extends Object?> static method
Runs use with a fresh HMAC-SHA-512 built from key, then wipes it.
The instance must be clean after you don't need it; this method
guarantees that, even if use throws.
Implementation
static T hmacSha512<T extends Object?>(
List<int> key,
T Function(BuSerializableHash cipher) use,
) {
final cipher = hmacSha512Instance(key);
try {
return use(cipher);
} finally {
cipher.clean();
}
}