A very simple wrapper around the org.mindrot.jbcrypt library.
I previously pulled my code off of GitHub but I have brought it back for posterity.
I have updated to the last available version of jBcrypt.
;;deps.edn
clj-bcrypt-wrapper/clj-bcrypt-wrapper {:mvn/version "0.3.0"}
;;project.clj:
[clj-bcrypt-wrapper "0.3.0"]
;; In your ns statement:
(ns my.ns
(:require [clj-bcrypt-wrapper.core :refer :all]))
;;default salt
(encrypt "some password")
;;supply a salt
(encrypt (gensalt 10) "some password")
(check-password "some password" hashed-password)
Copyright © 2013-2025
Distributed under the Eclipse Public License, the same as Clojure.
Can you improve this documentation? These fine people already did:
Robert Beaupre & robearEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |