summaryrefslogtreecommitdiff
path: root/lib/trocla/formats/bcrypt.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/trocla/formats/bcrypt.rb')
-rw-r--r--lib/trocla/formats/bcrypt.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/trocla/formats/bcrypt.rb b/lib/trocla/formats/bcrypt.rb
new file mode 100644
index 0000000..4b6fb33
--- /dev/null
+++ b/lib/trocla/formats/bcrypt.rb
@@ -0,0 +1,6 @@
+class Trocla::Formats::Bcrypt < Trocla::Formats::Base
+ require 'bcrypt'
+ def format(plain_password,options={})
+ BCrypt::Password.create(plain_password).to_s
+ end
+end