return;
}
if (opslimit < crypto_pwhash_OPSLIMIT_MIN) {
- zend_throw_exception(sodium_exception_ce,
- "number of operations for the password hashing function is too low", 0);
- return;
+ zend_error(E_ERROR,
+ "number of operations for the password hashing function is too low");
}
if (memlimit < crypto_pwhash_MEMLIMIT_MIN) {
- zend_throw_exception(sodium_exception_ce,
- "maximum memory for the password hashing function is too low", 0);
+ zend_error(E_ERROR, "maximum memory for the password hashing function is too low");
}
hash = zend_string_alloc((size_t) hash_len, 0);
ret = -1;
zend_error(E_WARNING, "empty password");
}
if (opslimit < crypto_pwhash_OPSLIMIT_MIN) {
- zend_throw_exception(sodium_exception_ce,
- "number of operations for the password hashing function is too low", 0);
+ zend_error(E_ERROR,
+ "number of operations for the password hashing function is too low");
}
if (memlimit < crypto_pwhash_MEMLIMIT_MIN) {
- zend_throw_exception(sodium_exception_ce,
- "maximum memory for the password hashing function is too low", 0);
+ zend_error(E_ERROR,
+ "maximum memory for the password hashing function is too low");
}
hash_str = zend_string_alloc(crypto_pwhash_STRBYTES - 1, 0);
if (crypto_pwhash_str
return;
}
if (opslimit < crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE) {
- zend_throw_exception(sodium_exception_ce,
- "number of operations for the scrypt function is too low", 0);
+ zend_error(E_ERROR,
+ "number of operations for the scrypt function is too low");
}
if (memlimit < crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE) {
- zend_throw_exception(sodium_exception_ce,
- "maximum memory for the scrypt function is too low", 0);
+ zend_error(E_ERROR,
+ "maximum memory for the scrypt function is too low");
}
hash = zend_string_alloc((size_t) hash_len, 0);
if (crypto_pwhash_scryptsalsa208sha256
zend_error(E_WARNING, "empty password");
}
if (opslimit < crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE) {
- zend_throw_exception(sodium_exception_ce,
- "number of operations for the scrypt function is too low", 0);
+ zend_error(E_ERROR,
+ "number of operations for the scrypt function is too low");
}
if (memlimit < crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE) {
- zend_throw_exception(sodium_exception_ce,
- "maximum memory for the scrypt function is too low", 0);
+ zend_error(E_ERROR,
+ "maximum memory for the scrypt function is too low");
}
hash_str = zend_string_alloc
(crypto_pwhash_scryptsalsa208sha256_STRBYTES - 1, 0);