law pbkdf2_zero_iterations

bend-osdev-crypto@0.1.0.0 · LAWS.bend:529

import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
import bend-osdev-crypto@0.1.0.0/inst_pbkdf2.bend as PbI

529# PBKDF2 refuses an iteration count of 0 (over HMAC-SHA-1)
530law pbkdf2_zero_iterations:
531  {Result.map(&2, &2, Cr.CrError, B.Octets, Unit, o => Unit{}, PbI.CrPbkdf2.hmac_sha1(B.Octets.of_string("password"), B.Octets.of_string("salt"), 0, 20n)) == Fail{Cr.CrTooShort{0n}} : Result<&2, &2, Cr.CrError, Unit>}

Uses (7)

Used by (0)

No other definition uses this definition.