From 328b73bc759c3b8a1acd6923410911dfaef23822 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 26 Nov 2011 16:46:10 +0100 Subject: rather use salt than random string to avoid not allowed characters --- lib/trocla/formats/sha256crypt.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/trocla/formats/sha256crypt.rb') diff --git a/lib/trocla/formats/sha256crypt.rb b/lib/trocla/formats/sha256crypt.rb index fe6659c..6bd1b72 100644 --- a/lib/trocla/formats/sha256crypt.rb +++ b/lib/trocla/formats/sha256crypt.rb @@ -1,6 +1,6 @@ # salted crypt class Trocla::Formats::Sha256crypt def format(plain_password,options={}) - plain_password.crypt('$5$' << Trocla::Util.random_str(8) << '$') + plain_password.crypt('$5$' << Trocla::Util.salt << '$') end end -- cgit v1.2.3