test_class.file: java_src/src/test/java/com/google/crypto/tink/prf/AesCmacPrfKeyManagerTest.java
test_class.identifier: AesCmacPrfKeyManagerTest
test_case.body: @Test
    public void createKey_checkValues() throws Exception {
      AesCmacPrfKeyFormat keyFormat = makeAesCmacPrfKeyFormat(32);
      AesCmacPrfKey key = new AesCmacPrfKeyManager().keyFactory().createKey(keyFormat);
      assertThat(key.getKeyValue()).hasSize(keyFormat.getKeySize());
    }
test_case.class_method_signature: AesCmacPrfKeyManagerTest.createKey_checkValues()
test_case.full_signature: @Test public void createKey_checkValues()
test_case.identifier: createKey_checkValues
test_case.invocations: makeAesCmacPrfKeyFormat createKey keyFactory hasSize assertThat getKeyValue getKeySize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void createKey_checkValues()
focal_class.declarator: VERSION = 0
focal_class.modifier: private static final
focal_class.original_string: private static final int VERSION = 0;
focal_class.type: int
focal_class.var_name: VERSION
focal_class.declarator: KEY_SIZE_IN_BYTES = 32
focal_class.modifier: private static final
focal_class.original_string: private static final int KEY_SIZE_IN_BYTES = 32;
focal_class.type: int
focal_class.var_name: KEY_SIZE_IN_BYTES
focal_class.file: java_src/src/main/java/com/google/crypto/tink/prf/AesCmacPrfKeyManager.java
focal_class.identifier: AesCmacPrfKeyManager
focal_class.class_method_signature: AesCmacPrfKeyManager.AesCmacPrfKeyManager()
focal_class.full_signature:   AesCmacPrfKeyManager()
focal_class.identifier: AesCmacPrfKeyManager
focal_class.parameters: ()
focal_class.signature:  AesCmacPrfKeyManager()
focal_class.class_method_signature: AesCmacPrfKeyManager.getKeyType()
focal_class.full_signature: @Override public String getKeyType()
focal_class.identifier: getKeyType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getKeyType()
focal_class.class_method_signature: AesCmacPrfKeyManager.getVersion()
focal_class.full_signature: @Override public int getVersion()
focal_class.identifier: getVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getVersion()
focal_class.class_method_signature: AesCmacPrfKeyManager.keyMaterialType()
focal_class.full_signature: @Override public KeyMaterialType keyMaterialType()
focal_class.identifier: keyMaterialType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: KeyMaterialType
focal_class.signature: KeyMaterialType keyMaterialType()
focal_class.class_method_signature: AesCmacPrfKeyManager.validateKey(AesCmacPrfKey key)
focal_class.full_signature: @Override public void validateKey(AesCmacPrfKey key)
focal_class.identifier: validateKey
focal_class.modifiers: @Override public
focal_class.parameters: (AesCmacPrfKey key)
focal_class.return: void
focal_class.signature: void validateKey(AesCmacPrfKey key)
focal_class.class_method_signature: AesCmacPrfKeyManager.parseKey(ByteString byteString)
focal_class.full_signature: @Override public AesCmacPrfKey parseKey(ByteString byteString)
focal_class.identifier: parseKey
focal_class.modifiers: @Override public
focal_class.parameters: (ByteString byteString)
focal_class.return: AesCmacPrfKey
focal_class.signature: AesCmacPrfKey parseKey(ByteString byteString)
focal_class.class_method_signature: AesCmacPrfKeyManager.validateSize(int size)
focal_class.full_signature: private static void validateSize(int size)
focal_class.identifier: validateSize
focal_class.modifiers: private static
focal_class.parameters: (int size)
focal_class.return: void
focal_class.signature: void validateSize(int size)
focal_class.class_method_signature: AesCmacPrfKeyManager.keyFactory()
focal_class.full_signature: @Override public KeyFactory<AesCmacPrfKeyFormat, AesCmacPrfKey> keyFactory()
focal_class.identifier: keyFactory
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: KeyFactory<AesCmacPrfKeyFormat, AesCmacPrfKey>
focal_class.signature: KeyFactory<AesCmacPrfKeyFormat, AesCmacPrfKey> keyFactory()
focal_class.class_method_signature: AesCmacPrfKeyManager.register(boolean newKeyAllowed)
focal_class.full_signature: public static void register(boolean newKeyAllowed)
focal_class.identifier: register
focal_class.modifiers: public static
focal_class.parameters: (boolean newKeyAllowed)
focal_class.return: void
focal_class.signature: void register(boolean newKeyAllowed)
focal_class.class_method_signature: AesCmacPrfKeyManager.aes256CmacTemplate()
focal_class.full_signature: public static final KeyTemplate aes256CmacTemplate()
focal_class.identifier: aes256CmacTemplate
focal_class.modifiers: public static final
focal_class.parameters: ()
focal_class.return: KeyTemplate
focal_class.signature: KeyTemplate aes256CmacTemplate()
focal_class.superclass: extends KeyTypeManager<AesCmacPrfKey>
focal_method.body: @Override
    public KeyFactory<AesCmacPrfKeyFormat, AesCmacPrfKey> keyFactory() {
      return new KeyFactory<AesCmacPrfKeyFormat, AesCmacPrfKey>(AesCmacPrfKeyFormat.class) {
        @Override
        public void validateKeyFormat(AesCmacPrfKeyFormat format) throws GeneralSecurityException {
          validateSize(format.getKeySize());
        }
  
        @Override
        public AesCmacPrfKeyFormat parseKeyFormat(ByteString byteString)
            throws InvalidProtocolBufferException {
          return AesCmacPrfKeyFormat.parseFrom(byteString, ExtensionRegistryLite.getEmptyRegistry());
        }
  
        @Override
        public AesCmacPrfKey createKey(AesCmacPrfKeyFormat format) {
          return AesCmacPrfKey.newBuilder()
              .setVersion(VERSION)
              .setKeyValue(ByteString.copyFrom(Random.randBytes(format.getKeySize())))
              .build();
        }
      };
    }
focal_method.class_method_signature: AesCmacPrfKeyManager.keyFactory()
focal_method.full_signature: @Override public KeyFactory<AesCmacPrfKeyFormat, AesCmacPrfKey> keyFactory()
focal_method.identifier: keyFactory
focal_method.invocations: validateSize getKeySize parseFrom getEmptyRegistry build setKeyValue setVersion newBuilder copyFrom randBytes getKeySize
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: KeyFactory<AesCmacPrfKeyFormat, AesCmacPrfKey>
focal_method.signature: KeyFactory<AesCmacPrfKeyFormat, AesCmacPrfKey> keyFactory()