replace IllegalArgumentException with require
This commit is contained in:
@@ -9,7 +9,7 @@ class Blake2b(
|
||||
override val bytes: Int,
|
||||
) : HashFunction {
|
||||
init {
|
||||
if (bytes !in 1..64) throw IllegalArgumentException()
|
||||
require(bytes in 1..64)
|
||||
}
|
||||
|
||||
override val block: Int
|
||||
|
||||
Reference in New Issue
Block a user