mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-26 15:01:31 +00:00
core/crypto/pbkdf2: Ensure non-zero iteration count
This commit is contained in:
@@ -19,6 +19,8 @@ derive :: proc(
|
||||
iterations: u32,
|
||||
dst: []byte,
|
||||
) {
|
||||
ensure(iterations > 0, "crypto/pbkdf2: non-zero iterations required")
|
||||
|
||||
h_len := hash.DIGEST_SIZES[hmac_hash]
|
||||
|
||||
// 1. If dkLen > (2^32 - 1) * hLen, output "derived key too long"
|
||||
|
||||
Reference in New Issue
Block a user