@RequiresApi(Build.VERSION_CODES.M)
  public static void generateNewAeadKey(String keyUri) throws GeneralSecurityException {
    AndroidKeystoreKmsClient client = new AndroidKeystoreKmsClient();
    synchronized (keystoreLock) {
      if (client.hasKey(keyUri)) {
        throw new IllegalArgumentException(
            String.format(
                "cannot generate a new key %s because it already exists; please delete it with"
                    + " deleteKey() and try again",
                keyUri));
      }
      generateNewAesGcmKeyWithoutExistenceCheck(keyUri);
    }
  }
Generates a new key in Android Keystore.

<p>Generates AES256-GCM keys.
java_src/src/main/java/com/google/crypto/tink/integration/android/AndroidKeystoreKmsClient.java