diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/trocla/formats/md5crypt.rb | 4 | ||||
-rw-r--r-- | lib/trocla/formats/sha256crypt.rb | 2 | ||||
-rw-r--r-- | lib/trocla/formats/sha512crypt.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/trocla/formats/md5crypt.rb b/lib/trocla/formats/md5crypt.rb index f52e2a1..36e3a3c 100644 --- a/lib/trocla/formats/md5crypt.rb +++ b/lib/trocla/formats/md5crypt.rb @@ -1,6 +1,6 @@ # salted crypt class Trocla::Formats::Md5crypt def format(plain_password,options={}) - plain_password.crypt('$1$' << Trocla::Util.random_str(8) << '$') + plain_password.crypt('$1$' << Trocla::Util.salt << '$') end -end
\ No newline at end of file +end 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 diff --git a/lib/trocla/formats/sha512crypt.rb b/lib/trocla/formats/sha512crypt.rb index d57b93d..d2725c1 100644 --- a/lib/trocla/formats/sha512crypt.rb +++ b/lib/trocla/formats/sha512crypt.rb @@ -1,6 +1,6 @@ # salted crypt class Trocla::Formats::Sha512crypt def format(plain_password,options={}) - plain_password.crypt('$6$' << Trocla::Util.random_str(8) << '$') + plain_password.crypt('$6$' << Trocla::Util.salt << '$') end end |