From 5fbcba7e6e44f45967fdae469075d84194080734 Mon Sep 17 00:00:00 2001 From: David Feng Date: Thu, 16 Jun 2016 15:06:35 +0800 Subject: [PATCH] add readme --- lua/toolkit/encryption/readme.md | 3 +++ lua/toolkit/encryption/test.lua | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 lua/toolkit/encryption/readme.md diff --git a/lua/toolkit/encryption/readme.md b/lua/toolkit/encryption/readme.md new file mode 100644 index 0000000..d221859 --- /dev/null +++ b/lua/toolkit/encryption/readme.md @@ -0,0 +1,3 @@ +# encryption utils + +cocos2d-x项目中经常使用的加密/压缩算法的Lua53绑定 diff --git a/lua/toolkit/encryption/test.lua b/lua/toolkit/encryption/test.lua index 7d80036..6288bb1 100755 --- a/lua/toolkit/encryption/test.lua +++ b/lua/toolkit/encryption/test.lua @@ -27,7 +27,9 @@ local function hex_to_str(s) end) end -local blowfish_key = blowfish.new(hex_to_str('hello blowfish key')) +local s = hex_to_str('hello blowfish key') +print(#s, dump_string(s)) +local blowfish_key = blowfish.new(s) local fc = '123' local ec, rl = blowfish_key:encrypt(fc)