Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
davidxifeng committed Jun 16, 2016
1 parent 25a0d52 commit 5fbcba7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lua/toolkit/encryption/readme.md
@@ -0,0 +1,3 @@
# encryption utils

cocos2d-x项目中经常使用的加密/压缩算法的Lua53绑定
4 changes: 3 additions & 1 deletion lua/toolkit/encryption/test.lua
Expand Up @@ -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)
Expand Down

0 comments on commit 5fbcba7

Please sign in to comment.