We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fafdd5 commit afe6567Copy full SHA for afe6567
test/test_ldif.rb
@@ -3,7 +3,7 @@
3
require 'common'
4
5
require 'net/ldif'
6
-require 'sha1'
+require 'digest/sha1'
7
require 'base64'
8
9
class TestLdif < Test::Unit::TestCase
@@ -24,7 +24,7 @@ def test_ldif_with_comments
24
25
def test_ldif_with_password
26
psw = "goldbricks"
27
- hashed_psw = "{SHA}" + Base64::encode64( SHA1.new(psw).digest ).chomp
+ hashed_psw = "{SHA}" + Base64::encode64(Digest::SHA1.digest(psw)).chomp
28
29
ldif_encoded = Base64::encode64( hashed_psw ).chomp
30
ds = Net::LDAP::Dataset::read_ldif( StringIO.new( "dn: Goldbrick\r\nuserPassword:: #{ldif_encoded}\r\n\r\n" ))
0 commit comments