module ActiveLdap::UserPassword
def smd5(password, salt=nil)
def smd5(password, salt=nil) if salt and salt.size < 4 raise ArgumentError, _("salt size must be >= 4: %s") % salt.inspect end salt ||= Salt.generate(4) md5_hash_with_salt = "#{Digest::MD5.digest(password + salt)}#{salt}" "{SMD5}#{[md5_hash_with_salt].pack('m').gsub("\n", '')}" end