AesEaxKeyManager extends KeyTypeManager<AesEaxKey> { public static final KeyTemplate aes128EaxTemplate() { return createKeyTemplate(16, 16, KeyTemplate.OutputPrefixType.TINK); } AesEaxKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesEaxKey key); @Override AesEaxKey parseKey(ByteString byteString); @Override KeyFactory<AesEaxKeyFormat, AesEaxKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes128EaxTemplate(); static final KeyTemplate rawAes128EaxTemplate(); static final KeyTemplate aes256EaxTemplate(); static final KeyTemplate rawAes256EaxTemplate();  }
@Test public void testAes128EaxTemplate() throws Exception { KeyTemplate template = AesEaxKeyManager.aes128EaxTemplate(); assertEquals(new AesEaxKeyManager().getKeyType(), template.getTypeUrl()); assertEquals(KeyTemplate.OutputPrefixType.TINK, template.getOutputPrefixType()); AesEaxKeyFormat format = AesEaxKeyFormat.parseFrom( ByteString.copyFrom(template.getValue()), ExtensionRegistryLite.getEmptyRegistry()); assertEquals(16, format.getKeySize()); assertTrue(format.hasParams()); assertEquals(16, format.getParams().getIvSize()); }