@Test public void testAes128GcmHkdf4KBTemplate() throws Exception { KeyTemplate template = AesGcmHkdfStreamingKeyManager.aes128GcmHkdf4KBTemplate(); assertThat(template.getTypeUrl()).isEqualTo(new AesGcmHkdfStreamingKeyManager().getKeyType()); assertThat(template.getOutputPrefixType()).isEqualTo(KeyTemplate.OutputPrefixType.RAW); AesGcmHkdfStreamingKeyFormat format = AesGcmHkdfStreamingKeyFormat.parseFrom( template.getValue(), ExtensionRegistryLite.getEmptyRegistry()); assertThat(format.getKeySize()).isEqualTo(16); assertThat(format.getParams().getDerivedKeySize()).isEqualTo(16); assertThat(format.getParams().getHkdfHashType()).isEqualTo(HashType.SHA256); assertThat(format.getParams().getCiphertextSegmentSize()).isEqualTo(4096); }
public static final KeyTemplate aes128GcmHkdf4KBTemplate() { return createKeyTemplate(16, HashType.SHA256, 16, 4096); }
AesGcmHkdfStreamingKeyManager extends KeyTypeManager<AesGcmHkdfStreamingKey> { public static final KeyTemplate aes128GcmHkdf4KBTemplate() { return createKeyTemplate(16, HashType.SHA256, 16, 4096); } }
AesGcmHkdfStreamingKeyManager extends KeyTypeManager<AesGcmHkdfStreamingKey> { public static final KeyTemplate aes128GcmHkdf4KBTemplate() { return createKeyTemplate(16, HashType.SHA256, 16, 4096); } AesGcmHkdfStreamingKeyManager(); }
AesGcmHkdfStreamingKeyManager extends KeyTypeManager<AesGcmHkdfStreamingKey> { public static final KeyTemplate aes128GcmHkdf4KBTemplate() { return createKeyTemplate(16, HashType.SHA256, 16, 4096); } AesGcmHkdfStreamingKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesGcmHkdfStreamingKey key); @Override AesGcmHkdfStreamingKey parseKey(ByteString byteString); @Override KeyFactory<AesGcmHkdfStreamingKeyFormat, AesGcmHkdfStreamingKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes128GcmHkdf4KBTemplate(); static final KeyTemplate aes128GcmHkdf1MBTemplate(); static final KeyTemplate aes256GcmHkdf4KBTemplate(); static final KeyTemplate aes256GcmHkdf1MBTemplate(); }
AesGcmHkdfStreamingKeyManager extends KeyTypeManager<AesGcmHkdfStreamingKey> { public static final KeyTemplate aes128GcmHkdf4KBTemplate() { return createKeyTemplate(16, HashType.SHA256, 16, 4096); } AesGcmHkdfStreamingKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesGcmHkdfStreamingKey key); @Override AesGcmHkdfStreamingKey parseKey(ByteString byteString); @Override KeyFactory<AesGcmHkdfStreamingKeyFormat, AesGcmHkdfStreamingKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes128GcmHkdf4KBTemplate(); static final KeyTemplate aes128GcmHkdf1MBTemplate(); static final KeyTemplate aes256GcmHkdf4KBTemplate(); static final KeyTemplate aes256GcmHkdf1MBTemplate();  }