$21 GRAYBYTE WORDPRESS FILE MANAGER $32

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/imunify360-webshield/lualib/resty/

HOME
Current File : /opt/imunify360-webshield/lualib/resty//sha384.lua
-- Copyright (C) by Yichun Zhang (agentzh)


require "resty.sha512"
local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_str = ffi.string
local C = ffi.C
local setmetatable = setmetatable
--local error = error


local _M = { _VERSION = '0.16' }


local mt = { __index = _M }


ffi.cdef[[
int SHA384_Init(SHA512_CTX *c);
int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
int SHA384_Final(unsigned char *md, SHA512_CTX *c);
]]

local digest_len = 48

local buf = ffi_new("char[?]", digest_len)
local ctx_ptr_type = ffi.typeof("SHA512_CTX[1]")


function _M.new(self)
    local ctx = ffi_new(ctx_ptr_type)
    if C.SHA384_Init(ctx) == 0 then
        return nil
    end

    return setmetatable({ _ctx = ctx }, mt)
end


function _M.update(self, s)
    return C.SHA384_Update(self._ctx, s, #s) == 1
end


function _M.final(self)
    if C.SHA384_Final(buf, self._ctx) == 1 then
        return ffi_str(buf, digest_len)
    end

    return nil
end


function _M.reset(self)
    return C.SHA384_Init(self._ctx) == 1
end

return _M


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 10.11 AM
root / root
0755
core
--
16 Dec 2025 10.11 AM
root / root
0755
dns
--
16 Dec 2025 10.11 AM
root / root
0755
limit
--
16 Dec 2025 10.11 AM
root / root
0755
lrucache
--
16 Dec 2025 10.11 AM
root / root
0755
template
--
16 Dec 2025 10.11 AM
root / root
0755
upstream
--
16 Dec 2025 10.11 AM
root / root
0755
websocket
--
16 Dec 2025 10.11 AM
root / root
0755
aes.lua
9.624 KB
26 Nov 2025 10.43 PM
root / root
0644
cookie.lua
5.548 KB
26 Nov 2025 10.43 PM
root / root
0644
core.lua
0.693 KB
26 Nov 2025 10.43 PM
root / root
0644
http.lua
28.99 KB
26 Nov 2025 10.43 PM
root / root
0644
http_headers.lua
1.123 KB
26 Nov 2025 10.43 PM
root / root
0644
lock.lua
4.581 KB
26 Nov 2025 10.43 PM
root / root
0644
lrucache.lua
6.95 KB
26 Nov 2025 10.43 PM
root / root
0644
md5.lua
1.194 KB
26 Nov 2025 10.43 PM
root / root
0644
random.lua
0.656 KB
26 Nov 2025 10.43 PM
root / root
0644
sha.lua
0.23 KB
26 Nov 2025 10.43 PM
root / root
0644
sha1.lua
1.164 KB
26 Nov 2025 10.43 PM
root / root
0644
sha224.lua
1.021 KB
26 Nov 2025 10.43 PM
root / root
0644
sha256.lua
1.192 KB
26 Nov 2025 10.43 PM
root / root
0644
sha384.lua
1.021 KB
26 Nov 2025 10.43 PM
root / root
0644
sha512.lua
1.327 KB
26 Nov 2025 10.43 PM
root / root
0644
shell.lua
4.875 KB
26 Nov 2025 10.43 PM
root / root
0644
signal.lua
3.115 KB
26 Nov 2025 10.43 PM
root / root
0644
string.lua
0.866 KB
26 Nov 2025 10.43 PM
root / root
0644
template.lua
22.686 KB
26 Nov 2025 10.43 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF