Displaying 1 result from an estimated 1 matches for "new_hashed_password".
2006 Apr 05
0
Tests creating output?
...;'
require ''base64''
new_password = Digest::SHA1.new
new_password << password
new_password = "{SHA}" << Base64.b64encode(new_password.digest).chop
end
And here''s my test:
def test_hashed_passwords_should_be_LDAP_compliant
new_hashed_password = ''{SHA}blahblahblah=''
new_password = people(:staff1_person).hashed_password(''password'')
assert_equal new_password, new_hashed_password
end
When I run the test, it passes, but it outputs the hash somewhere in
hashed_password:
$ ruby test/unit/person_t...