public static final void validateUsesConscrypt() throws GeneralSecurityException {
    String providerName = localRandom.get().getProvider().getName();
    if (!providerName.equals("GmsCore_OpenSSL")
        && !providerName.equals("AndroidOpenSSL")
        && !providerName.equals("Conscrypt")) {
      throw new GeneralSecurityException(
          "Requires GmsCore_OpenSSL, AndroidOpenSSL or Conscrypt to generate randomness, but got "
              + providerName);
    }
  }
Throws a GeneralSecurityException if the provider is not Conscrypt.
java_src/src/main/java/com/google/crypto/tink/internal/Random.java