bungle / lua-resty-nettle

LuaJIT FFI bindings for Nettle (a low-level cryptographic library)
BSD 2-Clause "Simplified" License
182 stars 45 forks source link

loop or previous error loading module 'resty.nettle.hmac' #21

Closed NoKeqi closed 5 years ago

NoKeqi commented 5 years ago

hello bungle

i tried to use this ,but errors occur: loop or previous error loading module 'resty.nettle.hmac'

this is my test code: local hmac = require ("resty.nettle.hmac") local hash = hmac.sha256.new("a") hash:update("a") local dgst = hash:digest() print("hmac sha256", #dgst, hex(dgst))

first i put nettle.lua and nettle directory in my default openresty directory (/usr/local/openresty/lualib/resty/) second type "opm get bungle/lua-resty-nettle" in commond line and it installed successfully

my lua version is 5.1.4

and i tried to use your other lib(lua-resty-session), it works correctly

now what can i do to solve the problem? help me~~~

bungle commented 5 years ago

Have you installed libnettle? https://www.lysator.liu.se/~nisse/nettle/

NoKeqi commented 5 years ago

i had solved the problem its not your problem but mine due to my coding environment

thx~