summaryrefslogtreecommitdiff
path: root/lib/trocla/formats/md5crypt.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/trocla/formats/md5crypt.rb')
-rw-r--r--lib/trocla/formats/md5crypt.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/trocla/formats/md5crypt.rb b/lib/trocla/formats/md5crypt.rb
new file mode 100644
index 0000000..80d2f09
--- /dev/null
+++ b/lib/trocla/formats/md5crypt.rb
@@ -0,0 +1,6 @@
+# salted crypt
+class Trocla::Formats::Md5crypt < Trocla::Formats::Base
+ def format(plain_password,options={})
+ plain_password.crypt('$1$' << Trocla::Util.salt << '$')
+ end
+end