summaryrefslogtreecommitdiff
path: root/lib/trocla/formats/sha256crypt.rb
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-11-26 16:46:10 +0100
committermh <mh@immerda.ch>2011-11-26 16:46:10 +0100
commit328b73bc759c3b8a1acd6923410911dfaef23822 (patch)
tree86891fa48afada448ffc29030b538b977a11b677 /lib/trocla/formats/sha256crypt.rb
parent372cddd123b8840d19e1651d770275ae190839b6 (diff)
rather use salt than random string to avoid not allowed characters
Diffstat (limited to 'lib/trocla/formats/sha256crypt.rb')
-rw-r--r--lib/trocla/formats/sha256crypt.rb2
1 files changed, 1 insertions, 1 deletions
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