Git Product home page Git Product logo

xxtea-lua's Issues

Key is treated as zero-terminated string

Hello! It appears that key data is treated as a zero-terminated string by your library which makes it impossible to use '\0' as part of a key.

local xxtea = require 'xxtea'

local function hexdump(s)
    print((s:gsub('.', function (c) return ('%02x '):format(c:byte()) end)))
end

local s = 'abc'
hexdump(xxtea.encrypt(s, '\0'))
hexdump(xxtea.encrypt(s, '\0abc'))
hexdump(xxtea.encrypt(s, '\0\1\2\3'))

Output:

3a 07 00 f5 2f f1 76 79
3a 07 00 f5 2f f1 76 79
3a 07 00 f5 2f f1 76 79

worker process exited on signal 11

首先感谢开源xxtea-lua

我在openresty中使用xxtea.decrypt时,会出现“worker process 63 exited on signal 11”

openresty的版本是: 1.13.6.1

运行环境在 Docker中,使用的镜像是 openresty/openresty:alpine

我安装xxtea.so,是使用luarocks install xxtea

再次感谢

lua编程怎么直接引入第三方库函数

小马哥,你好,我是一个lua的使用者,我想直接调用你的xxtea中函数,需要导入src文件里的三个c文件。我按照网上的教程将它们放在我的项目目录或是打包成so文件,也不能调用成功。小马哥,你能教教我怎么引入吗?应该放在那个目录下或是怎么打包?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.