From 9146a541ff96b92f4f14c6292307b68dc4673097 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 27 Jul 2011 18:43:55 +0200 Subject: initial release of trocla --- lib/trocla/formats/pgsql.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lib/trocla/formats/pgsql.rb (limited to 'lib/trocla/formats/pgsql.rb') diff --git a/lib/trocla/formats/pgsql.rb b/lib/trocla/formats/pgsql.rb new file mode 100644 index 0000000..05c23ce --- /dev/null +++ b/lib/trocla/formats/pgsql.rb @@ -0,0 +1,7 @@ +class Trocla::Formats::Pgsql + require 'digest/md5' + def format(plain_password,options={}) + raise "You need pass the username in the options for this format" unless options['username'] + "md5" + Digest::MD5.hexdigest(plain_password + options['username']) + end +end \ No newline at end of file -- cgit v1.2.3