@RestrictedApi(
      explanation = "Accessing parts of keys can produce unexpected incompatibilities, annotate the function with @AccessesPartialKey",
      link = "https://developers.google.com/tink/design/access_control#accessing_partial_keys",
      allowedOnPath = ".*Test\\.java",
      allowlistAnnotations = {AccessesPartialKey.class})
  public static AesCmacPrfKey create(AesCmacPrfParameters parameters, SecretBytes keyBytes)
      throws GeneralSecurityException {

    if (parameters.getKeySizeBytes() != keyBytes.size()) {
      throw new GeneralSecurityException("Key size mismatch");
    }
    return new AesCmacPrfKey(parameters, keyBytes);
  }
Represents a key computing AES CMAC PRF.
java_src/src/main/java/com/google/crypto/tink/prf/AesCmacPrfKey.java