lua-resty-string icon indicating copy to clipboard operation
lua-resty-string copied to clipboard

String utilities and common hash functions for ngx_lua and LuaJIT

Results 32 lua-resty-string issues
Sort by recently updated
recently updated
newest added

when I use 128_ecb, first encrypt the content, then base64, why the result is wrong, is it exist a bug that it default use md5 to encode the key then...

I tryed encrypt a text with a key with PHP code,then it is OK when decrypt it with Java and Object-C , ``` mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $bindkey, $text, MCRYPT_MODE_ECB ) ``` I...

A fast string split function seems like it might belong in here. `ngx.re.split` hasn't been exposed yet (there's a pending patch) https://github.com/openresty/lua-nginx-module/issues/217.

the same key and the same mesg, but the result is different, why? lua: local key = "1" local mesg = "2" local aes_256_cbc_sha1x5 = aes:new(key, salt, aes.cipher(256,"cbc"), aes.hash.sha1, 5)...

@agentzh The example documentation for resty.random.bytes() contains a while loop. Is there a situation where resty.random.bytes() can return nil, or is this an error in the documentation? ``` lua local...

为了兼容以前c#写的项目,以及密码学综合工具(PYG_TOOLS Ver4.1.12.2)运算出来的结果 例如: key:secret plain:hello result:1BB9C2EEAEA1726B

could sha2 be added ?

here is the lua code ```lua local aes = require 'resty.aes' local cipher = aes:new('0123456789123456', nil, aes.cipher(128, 'ecb')) print(ngx.encode_base64(cipher:encrypt('foobar'))) ``` the output should be `rTeNAHEZtzsyn1dDAujGgQ==` blow is my php code...

Currently aes.lua only support AES GCM with tag, but does not support AAD (Additional Authenticated Data). Could someone please add AAD support in AES GCM mode?