replace IllegalArgumentException with require

This commit is contained in:
2025-12-14 00:14:55 +01:00
parent 8552d3dd2e
commit 1537dd1be3

View File

@@ -12,8 +12,8 @@ class PBKDF2(
function: HashFunction, function: HashFunction,
) : KDF { ) : KDF {
init { init {
if (bytes < 1) throw IllegalArgumentException() require(bytes > 0)
if (iterations < 1) throw IllegalArgumentException() require(iterations > 0)
} }
private val mac = HMAC(function) private val mac = HMAC(function)