Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
hd-community-waf / usr / local / share / lua / 5.1 / resty / nettle / hash.lua
Size: Mime:
require "resty.nettle.types.hash"
local lib      = require "resty.nettle.library"
local ffi      = require "ffi"
local tonumber = tonumber
local ffi_str  = ffi.string
local hashes   = {}
do
    local i, hs = 0, lib.nettle_hashes
    while hs[i] ~= nil do
        local hash = {
            name         = ffi_str(hs[i].name),
            context_size = tonumber(hs[i].context_size),
            block_size   = tonumber(hs[i].block_size),
            init         = hs[i].init,
            update       = hs[i].update,
            digest       = hs[i].digest
        }
        hashes[i+1] = hash
        hashes[hash.name] = hash
        i=i+1
    end
end
return {
    hashes = hashes
}