3 ms·
[u/forgot-CLHS](https://www.reddit.com/r/lisp/comments/1ikrz1g/shout_out_to_common_lisps_ironclad/ https://www.reddit.com/r/lisp/comments/1ikrz1g/shout_out_to_.
by veqq 2y ago
[u/forgot-CLHS](https://www.reddit.com/r/lisp/comments/1ikrz1g/shout_out_to_common_lisps_ironclad/ https://www.reddit.com/r/lisp/comments/1ikrz1g/shout_out_to_...) notes that Common Lisp's defact standard cryptography library Ironclad's [implementation](https://github.com/sharplispers/ironclad/blob/master/src/kdf/bcrypt.lisp https://github.com/sharplispers/ironclad/blob/master/src/kdf...) avoids such problems!
```
(defmethod derive-key ((kdf bcrypt) passphrase salt iteration-count key-length)
(declare (type (simple-array (unsigned-byte 8) (*)) passphrase salt))
(unless (<= (length passphrase) 72)
(error 'ironclad-error
:format-control "PASSPHRASE must be at most 72 bytes long."))...)
```