@@ -1853,13 +1853,11 @@ PHP_FUNCTION(sodium_crypto_pwhash)
1853
1853
return ;
1854
1854
}
1855
1855
if (opslimit < crypto_pwhash_OPSLIMIT_MIN ) {
1856
- zend_throw_exception (sodium_exception_ce ,
1857
- "number of operations for the password hashing function is too low" , 0 );
1858
- return ;
1856
+ zend_error (E_ERROR ,
1857
+ "number of operations for the password hashing function is too low" );
1859
1858
}
1860
1859
if (memlimit < crypto_pwhash_MEMLIMIT_MIN ) {
1861
- zend_throw_exception (sodium_exception_ce ,
1862
- "maximum memory for the password hashing function is too low" , 0 );
1860
+ zend_error (E_ERROR , "maximum memory for the password hashing function is too low" );
1863
1861
}
1864
1862
hash = zend_string_alloc ((size_t ) hash_len , 0 );
1865
1863
ret = -1 ;
@@ -1918,12 +1916,12 @@ PHP_FUNCTION(sodium_crypto_pwhash_str)
1918
1916
zend_error (E_WARNING , "empty password" );
1919
1917
}
1920
1918
if (opslimit < crypto_pwhash_OPSLIMIT_MIN ) {
1921
- zend_throw_exception ( sodium_exception_ce ,
1922
- "number of operations for the password hashing function is too low" , 0 );
1919
+ zend_error ( E_ERROR ,
1920
+ "number of operations for the password hashing function is too low" );
1923
1921
}
1924
1922
if (memlimit < crypto_pwhash_MEMLIMIT_MIN ) {
1925
- zend_throw_exception ( sodium_exception_ce ,
1926
- "maximum memory for the password hashing function is too low" , 0 );
1923
+ zend_error ( E_ERROR ,
1924
+ "maximum memory for the password hashing function is too low" );
1927
1925
}
1928
1926
hash_str = zend_string_alloc (crypto_pwhash_STRBYTES - 1 , 0 );
1929
1927
if (crypto_pwhash_str
@@ -2032,12 +2030,12 @@ PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256)
2032
2030
return ;
2033
2031
}
2034
2032
if (opslimit < crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE ) {
2035
- zend_throw_exception ( sodium_exception_ce ,
2036
- "number of operations for the scrypt function is too low" , 0 );
2033
+ zend_error ( E_ERROR ,
2034
+ "number of operations for the scrypt function is too low" );
2037
2035
}
2038
2036
if (memlimit < crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE ) {
2039
- zend_throw_exception ( sodium_exception_ce ,
2040
- "maximum memory for the scrypt function is too low" , 0 );
2037
+ zend_error ( E_ERROR ,
2038
+ "maximum memory for the scrypt function is too low" );
2041
2039
}
2042
2040
hash = zend_string_alloc ((size_t ) hash_len , 0 );
2043
2041
if (crypto_pwhash_scryptsalsa208sha256
@@ -2079,12 +2077,12 @@ PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str)
2079
2077
zend_error (E_WARNING , "empty password" );
2080
2078
}
2081
2079
if (opslimit < crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE ) {
2082
- zend_throw_exception ( sodium_exception_ce ,
2083
- "number of operations for the scrypt function is too low" , 0 );
2080
+ zend_error ( E_ERROR ,
2081
+ "number of operations for the scrypt function is too low" );
2084
2082
}
2085
2083
if (memlimit < crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE ) {
2086
- zend_throw_exception ( sodium_exception_ce ,
2087
- "maximum memory for the scrypt function is too low" , 0 );
2084
+ zend_error ( E_ERROR ,
2085
+ "maximum memory for the scrypt function is too low" );
2088
2086
}
2089
2087
hash_str = zend_string_alloc
2090
2088
(crypto_pwhash_scryptsalsa208sha256_STRBYTES - 1 , 0 );
0 commit comments