You are here

public static function ParagonIE_Sodium_Compat::crypto_pwhash_is_available in Automatic Updates 7

Same name and namespace in other branches
  1. 8 vendor/paragonie/sodium_compat/src/Compat.php \ParagonIE_Sodium_Compat::crypto_pwhash_is_available()

!Exclusive to sodium_compat!

This returns TRUE if the native crypto_pwhash API is available by libsodium. This returns FALSE if only sodium_compat is available.

Return value

bool

File

vendor/paragonie/sodium_compat/src/Compat.php, line 1940

Class

ParagonIE_Sodium_Compat

Code

public static function crypto_pwhash_is_available() {
  if (self::useNewSodiumAPI()) {
    return true;
  }
  if (self::use_fallback('crypto_pwhash')) {
    return true;
  }
  return false;
}