tomSecretsChallengeMac function

Uint8List tomSecretsChallengeMac(
  1. List<int> adminKey,
  2. String label,
  3. List<int> serviceNonce,
  4. List<int> adminNonce,
  5. int serviceStart,
)

The MAC of label over the challenge under adminKey.

Implementation

Uint8List tomSecretsChallengeMac(
  List<int> adminKey,
  String label,
  List<int> serviceNonce,
  List<int> adminNonce,
  int serviceStart,
) => Uint8List.fromList(
  crypto.Hmac(crypto.sha256, adminKey)
      .convert(
        tomSecretsChallengeInput(label, serviceNonce, adminNonce, serviceStart),
      )
      .bytes,
);