Method: Net::NTLM.ntlm_hash
- Defined in:
- lib/net/ntlm.rb
.ntlm_hash(password, opt = {}) ⇒ Object
Generate a NTLM Hash
121 122 123 124 125 126 127 |
# File 'lib/net/ntlm.rb', line 121 def ntlm_hash(password, opt = {}) pwd = password.dup unless opt[:unicode] pwd = EncodeUtil.encode_utf16le(pwd) end OpenSSL::Digest::MD4.digest pwd end |