openresty / lua-resty-string

String utilities and common hash functions for ngx_lua and LuaJIT
429 stars 143 forks source link

aes.lua with aes.js #63

Open louishot opened 6 years ago

louishot commented 6 years ago

Hi,

I'm try to use aes.lua with aes.js

I see the default configure is local aes_128_cbc_md5 = aes:new("AKeyForAES") -- the default cipher is AES 128 CBC with 1 round of MD5 -- for the key and a nil salt

what is the mean?

I know aes 128 Secret Key length must be 16 so need get md5 of the given password "AKeyForAES"? 1 round of MD5 mean just md5(password)? if 2 round of MD5 shoule be md5(md5(password)) ?

Thank you very much