equal
deleted
inserted
replaced
40 } else { |
40 } else { |
41 require_once dirname(__FILE__) . '/autoload-php7.php'; |
41 require_once dirname(__FILE__) . '/autoload-php7.php'; |
42 } |
42 } |
43 |
43 |
44 /* Explicitly, always load the Compat class: */ |
44 /* Explicitly, always load the Compat class: */ |
45 require_once dirname(__FILE__) . '/src/Compat.php'; |
45 if (!class_exists('ParagonIE_Sodium_Compat', false)) { |
|
46 require_once dirname(__FILE__) . '/src/Compat.php'; |
|
47 } |
46 |
48 |
47 if (!class_exists('SodiumException', false)) { |
49 if (!class_exists('SodiumException', false)) { |
48 require_once dirname(__FILE__) . '/src/SodiumException.php'; |
50 require_once dirname(__FILE__) . '/src/SodiumException.php'; |
49 } |
51 } |
50 if (PHP_VERSION_ID >= 50300) { |
52 if (PHP_VERSION_ID >= 50300) { |
67 require_once(dirname(__FILE__) . '/lib/php72compat.php'); |
69 require_once(dirname(__FILE__) . '/lib/php72compat.php'); |
68 } elseif (!function_exists('sodium_crypto_stream_xchacha20_xor')) { |
70 } elseif (!function_exists('sodium_crypto_stream_xchacha20_xor')) { |
69 // Older versions of {PHP, ext/sodium} will not define these |
71 // Older versions of {PHP, ext/sodium} will not define these |
70 require_once(dirname(__FILE__) . '/lib/php72compat.php'); |
72 require_once(dirname(__FILE__) . '/lib/php72compat.php'); |
71 } |
73 } |
|
74 require_once(dirname(__FILE__) . '/lib/stream-xchacha20.php'); |
72 require_once(dirname(__FILE__) . '/lib/ristretto255.php'); |
75 require_once(dirname(__FILE__) . '/lib/ristretto255.php'); |