Skip to content

Commit 64c711a

Browse files
Use to_s instead of digest in example.
Co-authored-by: Johannes Müller <[email protected]>
1 parent 3927859 commit 64c711a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/crypto/bcrypt.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Crypto::Bcrypt
7878
# require "crypto/bcrypt"
7979
#
8080
# password = Crypto::Bcrypt.new "secret", "CJjskaIgXR32DJYjVyNPdA=="
81-
# password.digest
81+
# password.to_s # => "$2a$11$CJjskaIgXR32DJYjVyNPd./ajV3Yj6GiP0IAI6rR.fMnjRgozqqqG"
8282
# ```
8383
def self.new(password : String, salt : String, cost = DEFAULT_COST)
8484
# We make a clone here to we don't keep a mutable reference to the original string

0 commit comments

Comments
 (0)