Skip to content

Commit

Permalink
Fix SHA-1 loading
Browse files Browse the repository at this point in the history
  • Loading branch information
javalikescript committed Apr 1, 2023
1 parent 3304574 commit 36107df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jls/util/MessageDigest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ end, function(MessageDigest)
end

function MessageDigest.fromOpenssl(alg)
local opensslLib = require('openssl') -- fail quickly if not available
return class.create(MessageDigest, function(md)
function md:initialize()
self.md = require('openssl').digest.new(alg)
self.md = opensslLib.digest.new(alg)
end
function md:update(m)
self.md:update(m)
Expand Down

0 comments on commit 36107df

Please sign in to comment.