XChaCha20Poly1305KeyManager extends KeyTypeManager<XChaCha20Poly1305Key> { @Override public int getVersion() { return 0; } XChaCha20Poly1305KeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override void validateKey(XChaCha20Poly1305Key key); @Override XChaCha20Poly1305Key parseKey(ByteString byteString); @Override KeyFactory<XChaCha20Poly1305KeyFormat, XChaCha20Poly1305Key> keyFactory(); static void register(boolean newKeyAllowed); static final KeyTemplate xChaCha20Poly1305Template(); static final KeyTemplate rawXChaCha20Poly1305Template();  }
@Test public void createKey_correctVersion() throws Exception { assertThat(factory.createKey(XChaCha20Poly1305KeyFormat.getDefaultInstance()).getVersion()) .isEqualTo(0); }