@Test public void testAes256CtrHmacSha2561MBTemplate() throws Exception { KeyTemplate template = AesCtrHmacStreamingKeyManager.aes256CtrHmacSha2561MBTemplate(); assertThat(template.getTypeUrl()).isEqualTo(new AesCtrHmacStreamingKeyManager().getKeyType()); assertThat(template.getOutputPrefixType()).isEqualTo(KeyTemplate.OutputPrefixType.RAW); AesCtrHmacStreamingKeyFormat format = AesCtrHmacStreamingKeyFormat.parseFrom( template.getValue(), ExtensionRegistryLite.getEmptyRegistry()); assertThat(format.getKeySize()).isEqualTo(32); assertThat(format.getParams().getDerivedKeySize()).isEqualTo(32); assertThat(format.getParams().getHkdfHashType()).isEqualTo(HashType.SHA256); assertThat(format.getParams().getHmacParams().getHash()).isEqualTo(HashType.SHA256); assertThat(format.getParams().getHmacParams().getTagSize()).isEqualTo(32); assertThat(format.getParams().getCiphertextSegmentSize()).isEqualTo(1 << 20); }
public static final KeyTemplate aes256CtrHmacSha2561MBTemplate() { return createKeyTemplate(32, HashType.SHA256, 32, HashType.SHA256, 32, 1 << 20); }
AesCtrHmacStreamingKeyManager extends KeyTypeManager<AesCtrHmacStreamingKey> { public static final KeyTemplate aes256CtrHmacSha2561MBTemplate() { return createKeyTemplate(32, HashType.SHA256, 32, HashType.SHA256, 32, 1 << 20); } }
AesCtrHmacStreamingKeyManager extends KeyTypeManager<AesCtrHmacStreamingKey> { public static final KeyTemplate aes256CtrHmacSha2561MBTemplate() { return createKeyTemplate(32, HashType.SHA256, 32, HashType.SHA256, 32, 1 << 20); } AesCtrHmacStreamingKeyManager(); }
AesCtrHmacStreamingKeyManager extends KeyTypeManager<AesCtrHmacStreamingKey> { public static final KeyTemplate aes256CtrHmacSha2561MBTemplate() { return createKeyTemplate(32, HashType.SHA256, 32, HashType.SHA256, 32, 1 << 20); } AesCtrHmacStreamingKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesCtrHmacStreamingKey key); @Override AesCtrHmacStreamingKey parseKey(ByteString byteString); @Override KeyFactory<AesCtrHmacStreamingKeyFormat, AesCtrHmacStreamingKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes128CtrHmacSha2564KBTemplate(); static final KeyTemplate aes128CtrHmacSha2561MBTemplate(); static final KeyTemplate aes256CtrHmacSha2564KBTemplate(); static final KeyTemplate aes256CtrHmacSha2561MBTemplate(); }
AesCtrHmacStreamingKeyManager extends KeyTypeManager<AesCtrHmacStreamingKey> { public static final KeyTemplate aes256CtrHmacSha2561MBTemplate() { return createKeyTemplate(32, HashType.SHA256, 32, HashType.SHA256, 32, 1 << 20); } AesCtrHmacStreamingKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesCtrHmacStreamingKey key); @Override AesCtrHmacStreamingKey parseKey(ByteString byteString); @Override KeyFactory<AesCtrHmacStreamingKeyFormat, AesCtrHmacStreamingKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes128CtrHmacSha2564KBTemplate(); static final KeyTemplate aes128CtrHmacSha2561MBTemplate(); static final KeyTemplate aes256CtrHmacSha2564KBTemplate(); static final KeyTemplate aes256CtrHmacSha2561MBTemplate();  }