public static void setFipsRestricted() throws GeneralSecurityException {
    if (!checkConscryptIsAvailableAndUsesFipsBoringSsl()) {
      throw new GeneralSecurityException(
          "Conscrypt is not available or does not support checking for FIPS build.");
    }
    Random.validateUsesConscrypt();
    isRestrictedToFips.set(true);
  }
Sets the binary to FIPS-only restricted mode. Fails if no FIPS-mode is available.
java_src/src/main/java/com/google/crypto/tink/config/internal/TinkFipsUtil.java