AesGcmSivKeyManager extends KeyTypeManager<AesGcmSivKey> { public static final KeyTemplate rawAes128GcmSivTemplate() { return createKeyTemplate(16, KeyTemplate.OutputPrefixType.RAW); } AesGcmSivKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesGcmSivKey key); @Override AesGcmSivKey parseKey(ByteString byteString); @Override KeyFactory<AesGcmSivKeyFormat, AesGcmSivKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes128GcmSivTemplate(); static final KeyTemplate rawAes128GcmSivTemplate(); static final KeyTemplate aes256GcmSivTemplate(); static final KeyTemplate rawAes256GcmSivTemplate();  }
@Test public void testRawAes128GcmSivTemplate() throws Exception { KeyTemplate template = AesGcmSivKeyManager.rawAes128GcmSivTemplate(); assertEquals(new AesGcmSivKeyManager().getKeyType(), template.getTypeUrl()); assertEquals(KeyTemplate.OutputPrefixType.RAW, template.getOutputPrefixType()); AesGcmSivKeyFormat format = AesGcmSivKeyFormat.parseFrom( ByteString.copyFrom(template.getValue()), ExtensionRegistryLite.getEmptyRegistry()); assertEquals(16, format.getKeySize()); }