Skip to content

dengqiang2015/lua-baselib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lua-baselib


**Introduction:** Lua base function library, including some CPU intensive functions.

**Dependency Library:** openssl

**Compile notes:**
You need to modify the Lua header file path and the Lua library path and the Lua module path in the Makefile file.
Such as:
LUACPATH ?= (lua module path)
INCDIR ?= -I (Lua header file path)
LIBDIR ?= -L (Lua library path) -lssl

Base functions list:
sha1
md5
tablen
ltrim
rtrim
trim
str2table
table2str
get_local_ip
base64_encode
base64_decode
urlencode
urldecode
strtoupper
strtolower
ucfirst
table_keys
crc32
table_key_exists
table_shuffle
split
join
parse_str
strpos
stripos
str_replace
range
convert
utf8_encode
utf8_decode
aes_encrypt
aes_decrypt
getext
openssl_decrypt
openssl_encrypt

How to use:
require 'baselib'
print(baselib.sha1('hello world'))

More examples:
View the test.lua file

About

base functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages