Added a password-hash generator.
This commit is contained in:
parent
bf9e230a09
commit
6f2d527c24
4 changed files with 92 additions and 0 deletions
|
@ -6,5 +6,6 @@ require 'test/unit'
|
|||
require 'tests/testber'
|
||||
require 'tests/testldif'
|
||||
require 'tests/testldap'
|
||||
require 'tests/testpsw'
|
||||
|
||||
|
||||
|
|
28
tests/testpsw.rb
Normal file
28
tests/testpsw.rb
Normal file
|
@ -0,0 +1,28 @@
|
|||
# $Id$
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
$:.unshift "lib"
|
||||
|
||||
require 'net/ldap'
|
||||
require 'stringio'
|
||||
|
||||
|
||||
class TestPassword < Test::Unit::TestCase
|
||||
|
||||
def setup
|
||||
end
|
||||
|
||||
|
||||
def test_psw
|
||||
assert_equal( "{MD5}xq8jwrcfibi0sZdZYNkSng==", Net::LDAP::Password.generate( :md5, "cashflow" ))
|
||||
assert_equal( "{SHA}YE4eGkN4BvwNN1f5R7CZz0kFn14=", Net::LDAP::Password.generate( :sha, "cashflow" ))
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue