Skip to content

Commit

Permalink
Merge pull request #51 from LeftClickBV/fix-apply-des-openssl
Browse files Browse the repository at this point in the history
Fix applying DES-CBC when using OpenSSL 3. Thanks for this!
  • Loading branch information
mwrock authored May 4, 2022
2 parents 719b1d3 + 4fd8f1b commit 72163c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/net/ntlm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ def gen_keys(str)
end

def apply_des(plain, keys)
dec = OpenSSL::Cipher.new("des-cbc").encrypt
dec.padding = 0
keys.map {|k|
dec = OpenSSL::Cipher.new("des-cbc").encrypt
dec.padding = 0
dec.key = k
dec.update(plain) + dec.final
}
Expand Down

0 comments on commit 72163c5

Please sign in to comment.