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,
) : KDF {
init {
if (bytes < 1) throw IllegalArgumentException()
if (iterations < 1) throw IllegalArgumentException()
require(bytes > 0)
require(iterations > 0)
}
private val mac = HMAC(function)