You are here

public static function ParagonIE_Sodium_Compat::library_version_major in Automatic Updates 8

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

The equivalent to the libsodium minor version we aim to be compatible with (sans pwhash and memzero).

Return value

int

1 call to ParagonIE_Sodium_Compat::library_version_major()
php72compat.php in vendor/paragonie/sodium_compat/lib/php72compat.php

File

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

Class

ParagonIE_Sodium_Compat

Code

public static function library_version_major() {
  if (self::useNewSodiumAPI() && defined('SODIUM_LIBRARY_MAJOR_VERSION')) {
    return SODIUM_LIBRARY_MAJOR_VERSION;
  }
  if (self::use_fallback('library_version_major')) {

    /** @psalm-suppress UndefinedFunction */
    return (int) call_user_func('\\Sodium\\library_version_major');
  }
  return self::LIBRARY_VERSION_MAJOR;
}