AesSivKeyManager extends KeyTypeManager<AesSivKey> { public static final KeyTemplate aes256SivTemplate() { return createKeyTemplate(64, KeyTemplate.OutputPrefixType.TINK); } AesSivKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesSivKey key); @Override AesSivKey parseKey(ByteString byteString); @Override KeyFactory<AesSivKeyFormat, AesSivKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes256SivTemplate(); static final KeyTemplate rawAes256SivTemplate();  }
@Test public void testAes256SivTemplate() throws Exception { KeyTemplate template = AesSivKeyManager.aes256SivTemplate(); assertThat(template.getTypeUrl()).isEqualTo(new AesSivKeyManager().getKeyType()); assertThat(template.getOutputPrefixType()).isEqualTo(KeyTemplate.OutputPrefixType.TINK); AesSivKeyFormat format = AesSivKeyFormat.parseFrom(template.getValue(), ExtensionRegistryLite.getEmptyRegistry()); assertThat(format.getKeySize()).isEqualTo(format.getKeySize()); }