summaryrefslogtreecommitdiffstats
path: root/vendor/plugins/ruby-net-ldap-0.0.4/lib/net/ldap/psw.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-02 19:30:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-02 19:30:01 +0000
commit73f9b825f08b0a197497acffd4437a34ff5e1e8c (patch)
tree2a233ff646b0087f7bf6afc7b4c07a30e1fc5ee9 /vendor/plugins/ruby-net-ldap-0.0.4/lib/net/ldap/psw.rb
parentd02f6a8e32d1e09e5303d36f09788a2d19ac413a (diff)
downloadredmine-73f9b825f08b0a197497acffd4437a34ff5e1e8c.tar.gz
redmine-73f9b825f08b0a197497acffd4437a34ff5e1e8c.zip
Replaced ruby-net-ldap with net-ldap 0.2.2 gem.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8751 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor/plugins/ruby-net-ldap-0.0.4/lib/net/ldap/psw.rb')
-rw-r--r--vendor/plugins/ruby-net-ldap-0.0.4/lib/net/ldap/psw.rb64
1 files changed, 0 insertions, 64 deletions
diff --git a/vendor/plugins/ruby-net-ldap-0.0.4/lib/net/ldap/psw.rb b/vendor/plugins/ruby-net-ldap-0.0.4/lib/net/ldap/psw.rb
deleted file mode 100644
index 89d1ffdf2..000000000
--- a/vendor/plugins/ruby-net-ldap-0.0.4/lib/net/ldap/psw.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# $Id: psw.rb 73 2006-04-24 21:59:35Z blackhedd $
-#
-#
-#----------------------------------------------------------------------------
-#
-# Copyright (C) 2006 by Francis Cianfrocca. All Rights Reserved.
-#
-# Gmail: garbagecat10
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#
-#---------------------------------------------------------------------------
-#
-#
-
-
-module Net
-class LDAP
-
-
-class Password
- class << self
-
- # Generate a password-hash suitable for inclusion in an LDAP attribute.
- # Pass a hash type (currently supported: :md5 and :sha) and a plaintext
- # password. This function will return a hashed representation.
- # STUB: This is here to fulfill the requirements of an RFC, which one?
- # TODO, gotta do salted-sha and (maybe) salted-md5.
- # Should we provide sha1 as a synonym for sha1? I vote no because then
- # should you also provide ssha1 for symmetry?
- def generate( type, str )
- case type
- when :md5
- require 'md5'
- "{MD5}#{ [MD5.new( str.to_s ).digest].pack("m").chomp }"
- when :sha
- require 'sha1'
- "{SHA}#{ [SHA1.new( str.to_s ).digest].pack("m").chomp }"
- # when ssha
- else
- raise Net::LDAP::LdapError.new( "unsupported password-hash type (#{type})" )
- end
- end
-
- end
-end
-
-
-end # class LDAP
-end # module Net
-
-