@Test public void testAes128CtrHmacSha256Template() throws Exception { KeyTemplate template = AesCtrHmacAeadKeyManager.aes128CtrHmacSha256Template(); assertEquals(new AesCtrHmacAeadKeyManager().getKeyType(), template.getTypeUrl()); assertEquals(KeyTemplate.OutputPrefixType.TINK, template.getOutputPrefixType()); AesCtrHmacAeadKeyFormat format = AesCtrHmacAeadKeyFormat.parseFrom( template.getValue(), ExtensionRegistryLite.getEmptyRegistry()); assertTrue(format.hasAesCtrKeyFormat()); assertTrue(format.getAesCtrKeyFormat().hasParams()); assertEquals(16, format.getAesCtrKeyFormat().getKeySize()); assertEquals(16, format.getAesCtrKeyFormat().getParams().getIvSize()); assertTrue(format.hasHmacKeyFormat()); assertTrue(format.getHmacKeyFormat().hasParams()); assertEquals(32, format.getHmacKeyFormat().getKeySize()); assertEquals(16, format.getHmacKeyFormat().getParams().getTagSize()); assertEquals(HashType.SHA256, format.getHmacKeyFormat().getParams().getHash()); }
public static final KeyTemplate aes128CtrHmacSha256Template() { return createKeyTemplate(16, 16, 32, 16, HashType.SHA256); }
AesCtrHmacAeadKeyManager extends KeyTypeManager<AesCtrHmacAeadKey> { public static final KeyTemplate aes128CtrHmacSha256Template() { return createKeyTemplate(16, 16, 32, 16, HashType.SHA256); } }
AesCtrHmacAeadKeyManager extends KeyTypeManager<AesCtrHmacAeadKey> { public static final KeyTemplate aes128CtrHmacSha256Template() { return createKeyTemplate(16, 16, 32, 16, HashType.SHA256); } AesCtrHmacAeadKeyManager(); }
AesCtrHmacAeadKeyManager extends KeyTypeManager<AesCtrHmacAeadKey> { public static final KeyTemplate aes128CtrHmacSha256Template() { return createKeyTemplate(16, 16, 32, 16, HashType.SHA256); } AesCtrHmacAeadKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesCtrHmacAeadKey key); @Override AesCtrHmacAeadKey parseKey(ByteString byteString); @Override KeyFactory<AesCtrHmacAeadKeyFormat, AesCtrHmacAeadKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes128CtrHmacSha256Template(); static final KeyTemplate aes256CtrHmacSha256Template(); }
AesCtrHmacAeadKeyManager extends KeyTypeManager<AesCtrHmacAeadKey> { public static final KeyTemplate aes128CtrHmacSha256Template() { return createKeyTemplate(16, 16, 32, 16, HashType.SHA256); } AesCtrHmacAeadKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(AesCtrHmacAeadKey key); @Override AesCtrHmacAeadKey parseKey(ByteString byteString); @Override KeyFactory<AesCtrHmacAeadKeyFormat, AesCtrHmacAeadKey> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate aes128CtrHmacSha256Template(); static final KeyTemplate aes256CtrHmacSha256Template();  }