Skip to content

Commit

Permalink
updated eli.hash to latest lua-mbed-hash
Browse files Browse the repository at this point in the history
  • Loading branch information
cryi committed Dec 30, 2024
1 parent cc6795f commit 3abde1d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/eli/hash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ local hash = {
--- Calculates sha256 hash of the data
--- @param data string
--- @param hex boolean? (default false) - if true, returns the hash in hex format
sha256_sum = mbed_hash.sha256sum,
sha256_sum = mbed_hash.sha256_sum,
---#DES 'hash.sha512_sum'
---
--- Calculates sha512 hash of the data
--- @param data string
--- @param hex boolean? (default false) - if true, returns the hash in hex format
sha512_sum = mbed_hash.sha512sum,
sha512_sum = mbed_hash.sha512_sum,
---#DES 'hash.sha256_init'
---
--- Initializes sha256 hash
--- @return HashGenerator
sha256_init = mbed_hash.sha256init,
sha256_init = mbed_hash.sha256_init,
---#DES 'hash.sha512_init'
---
--- Initializes sha512 hash
--- @return HashGenerator
sha512_init = mbed_hash.sha512init,
sha512_init = mbed_hash.sha512_init,
---#DES 'hash.equals'
---
--- Compares two hashes
Expand All @@ -43,25 +43,25 @@ local hash = {
---@deprecated
function hash.sha256sum(data, hex)
print"Deprecation warning: use hash.sha256_sum instead"
return mbed_hash.sha256sum(data, hex)
return mbed_hash.sha256_sum(data, hex)
end

---@deprecated
function hash.sha512sum(data, hex)
print"Deprecation warning: use hash.sha512_sum instead"
return mbed_hash.sha512sum(data, hex)
return mbed_hash.sha512_sum(data, hex)
end

---@deprecated
function hash.sha256init()
print"Deprecation warning: use hash.sha256_init instead"
return mbed_hash.sha256init()
return mbed_hash.sha256_init()
end

---@deprecated
function hash.sha512init()
print"Deprecation warning: use hash.sha512_init instead"
return mbed_hash.sha512init()
return mbed_hash.sha512_init()
end

return util.generate_safe_functions(hash)

0 comments on commit 3abde1d

Please sign in to comment.