test_class.declarator: manager = new JwtHmacKeyManager()
test_class.modifier: private final
test_class.original_string: private final JwtHmacKeyManager manager = new JwtHmacKeyManager();
test_class.type: JwtHmacKeyManager
test_class.var_name: manager
test_class.declarator: factory =
        manager.keyFactory()
test_class.modifier: private final
test_class.original_string: private final KeyTypeManager.KeyFactory<JwtHmacKeyFormat, JwtHmacKey> factory =
        manager.keyFactory();
test_class.type: KeyTypeManager.KeyFactory<JwtHmacKeyFormat, JwtHmacKey>
test_class.var_name: factory
test_class.file: java_src/src/test/java/com/google/crypto/tink/jwt/JwtHmacKeyManagerTest.java
test_class.identifier: JwtHmacKeyManagerTest
test_case.body: @Test
    public void validateKey_wrongVersion_throws() throws Exception {
      JwtHmacKey validKey = factory.createKey(makeJwtHmacKeyFormat(32, HashType.SHA256));
      try {
        manager.validateKey(JwtHmacKey.newBuilder(validKey).setVersion(1).build());
        fail();
      } catch (GeneralSecurityException e) {
        // expected
      }
    }
test_case.class_method_signature: JwtHmacKeyManagerTest.validateKey_wrongVersion_throws()
test_case.full_signature: @Test public void validateKey_wrongVersion_throws()
test_case.identifier: validateKey_wrongVersion_throws
test_case.invocations: createKey makeJwtHmacKeyFormat validateKey build setVersion newBuilder fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void validateKey_wrongVersion_throws()
focal_class.declarator: MIN_KEY_SIZE_IN_BYTES = 32
focal_class.modifier: private static final
focal_class.original_string: private static final int MIN_KEY_SIZE_IN_BYTES = 32;
focal_class.type: int
focal_class.var_name: MIN_KEY_SIZE_IN_BYTES
focal_class.file: java_src/src/main/java/com/google/crypto/tink/jwt/JwtHmacKeyManager.java
focal_class.identifier: JwtHmacKeyManager
focal_class.class_method_signature: JwtHmacKeyManager.JwtHmacKeyManager()
focal_class.full_signature: public  JwtHmacKeyManager()
focal_class.identifier: JwtHmacKeyManager
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  JwtHmacKeyManager()
focal_class.class_method_signature: JwtHmacKeyManager.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: JwtHmacKeyManager.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: JwtHmacKeyManager.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: JwtHmacKeyManager.validateKey(JwtHmacKey key)
focal_class.full_signature: @Override public void validateKey(JwtHmacKey key)
focal_class.identifier: validateKey
focal_class.modifiers: @Override public
focal_class.parameters: (JwtHmacKey key)
focal_class.return: void
focal_class.signature: void validateKey(JwtHmacKey key)
focal_class.class_method_signature: JwtHmacKeyManager.parseKey(ByteString byteString)
focal_class.full_signature: @Override public JwtHmacKey parseKey(ByteString byteString)
focal_class.identifier: parseKey
focal_class.modifiers: @Override public
focal_class.parameters: (ByteString byteString)
focal_class.return: JwtHmacKey
focal_class.signature: JwtHmacKey parseKey(ByteString byteString)
focal_class.class_method_signature: JwtHmacKeyManager.keyFactory()
focal_class.full_signature: @Override public KeyFactory<JwtHmacKeyFormat, JwtHmacKey> keyFactory()
focal_class.identifier: keyFactory
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: KeyFactory<JwtHmacKeyFormat, JwtHmacKey>
focal_class.signature: KeyFactory<JwtHmacKeyFormat, JwtHmacKey> keyFactory()
focal_class.class_method_signature: JwtHmacKeyManager.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: JwtHmacKeyManager.hs256Template()
focal_class.full_signature: public static final KeyTemplate hs256Template()
focal_class.identifier: hs256Template
focal_class.modifiers: public static final
focal_class.parameters: ()
focal_class.return: KeyTemplate
focal_class.signature: KeyTemplate hs256Template()
focal_class.class_method_signature: JwtHmacKeyManager.hs384Template()
focal_class.full_signature: public static final KeyTemplate hs384Template()
focal_class.identifier: hs384Template
focal_class.modifiers: public static final
focal_class.parameters: ()
focal_class.return: KeyTemplate
focal_class.signature: KeyTemplate hs384Template()
focal_class.class_method_signature: JwtHmacKeyManager.hs512Template()
focal_class.full_signature: public static final KeyTemplate hs512Template()
focal_class.identifier: hs512Template
focal_class.modifiers: public static final
focal_class.parameters: ()
focal_class.return: KeyTemplate
focal_class.signature: KeyTemplate hs512Template()
focal_class.class_method_signature: JwtHmacKeyManager.createTemplate(int keySize, HashType hashType)
focal_class.full_signature: private static KeyTemplate createTemplate(int keySize, HashType hashType)
focal_class.identifier: createTemplate
focal_class.modifiers: private static
focal_class.parameters: (int keySize, HashType hashType)
focal_class.return: KeyTemplate
focal_class.signature: KeyTemplate createTemplate(int keySize, HashType hashType)
focal_class.superclass: extends KeyTypeManager<JwtHmacKey>
focal_method.body: @Override
    public void validateKey(JwtHmacKey key) throws GeneralSecurityException {
      Validators.validateVersion(key.getVersion(), getVersion());
      if (key.getKeyValue().size() < MIN_KEY_SIZE_IN_BYTES) {
        throw new GeneralSecurityException("key too short");
      }
    }
focal_method.class_method_signature: JwtHmacKeyManager.validateKey(JwtHmacKey key)
focal_method.full_signature: @Override public void validateKey(JwtHmacKey key)
focal_method.identifier: validateKey
focal_method.invocations: validateVersion getVersion getVersion size getKeyValue
focal_method.modifiers: @Override public
focal_method.parameters: (JwtHmacKey key)
focal_method.return: void
focal_method.signature: void validateKey(JwtHmacKey key)