private static Aead createAead(ChaCha20Poly1305Key key) throws GeneralSecurityException {
    if (ChaCha20Poly1305Jce.isSupported()) {
      return ChaCha20Poly1305Jce.create(key);
    }
    return ChaCha20Poly1305.create(key);
  }
This instance of {@code KeyManager} generates new {@code ChaCha20Poly1305} keys and produces new
instances of {@code ChaCha20Poly1305}.
java_src/src/main/java/com/google/crypto/tink/aead/ChaCha20Poly1305KeyManager.java