CoseServerKey.hmac constructor
The shared secret of a COSE_Mac0 server, for alg (an HMAC algorithm);
throws ArgumentError otherwise.
Implementation
factory CoseServerKey.hmac(CoseAlg alg, Uint8List secret) {
if (!alg.isHmac) {
throw ArgumentError.value(alg, 'alg', 'must be an HMAC algorithm');
}
return CoseServerKey._(alg, Uint8List.fromList(secret));
}