@Test public void createKey_valuesAreOk() throws Exception { HkdfPrfKeyFormat format = HkdfPrfKeyFormat.newBuilder() .setKeySize(77) .setParams( HkdfPrfParams.newBuilder() .setSalt(ByteString.copyFrom(Random.randBytes(5))) .setHash(HashType.SHA256)) .build(); HkdfPrfKey key = factory.createKey(format); assertThat(key.getVersion()).isEqualTo(0); assertThat(key.getKeyValue()).hasSize(77); assertThat(key.getParams()).isEqualTo(format.getParams()); }
@Override public int getVersion() { return 0; }
HkdfPrfKeyManager extends KeyTypeManager<HkdfPrfKey> { @Override public int getVersion() { return 0; } }
HkdfPrfKeyManager extends KeyTypeManager<HkdfPrfKey> { @Override public int getVersion() { return 0; } HkdfPrfKeyManager(); }
HkdfPrfKeyManager extends KeyTypeManager<HkdfPrfKey> { @Override public int getVersion() { return 0; } HkdfPrfKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(HkdfPrfKey key); @Override HkdfPrfKey parseKey(ByteString byteString); @Override KeyFactory<HkdfPrfKeyFormat, HkdfPrfKey> keyFactory(); static void register(boolean newKeyAllowed); static String staticKeyType(); static final KeyTemplate hkdfSha256Template(); }
HkdfPrfKeyManager extends KeyTypeManager<HkdfPrfKey> { @Override public int getVersion() { return 0; } HkdfPrfKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(HkdfPrfKey key); @Override HkdfPrfKey parseKey(ByteString byteString); @Override KeyFactory<HkdfPrfKeyFormat, HkdfPrfKey> keyFactory(); static void register(boolean newKeyAllowed); static String staticKeyType(); static final KeyTemplate hkdfSha256Template();  }