replace IllegalArgumentException with require
This commit is contained in:
@@ -12,8 +12,8 @@ class PBKDF2(
|
||||
function: HashFunction,
|
||||
) : KDF {
|
||||
init {
|
||||
if (bytes < 1) throw IllegalArgumentException()
|
||||
if (iterations < 1) throw IllegalArgumentException()
|
||||
require(bytes > 0)
|
||||
require(iterations > 0)
|
||||
}
|
||||
|
||||
private val mac = HMAC(function)
|
||||
|
||||
Reference in New Issue
Block a user