Changes for page 01 Lua Functions
Last modified by Theodore Xu on 2023/10/26 10:51
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2038,7 +2038,7 @@ 2038 2038 2039 2039 **Function name** 2040 2040 2041 -hash_func: 2041 +hash_func: use hash algorithm 2042 2042 2043 2043 * [md5, sha1, sha224, sha256, sha384, sha512] 2044 2044 * [sha512_224, sha512_256, sha3_224, sha3_256] ... ... @@ -2076,16 +2076,14 @@ 2076 2076 2077 2077 **Function:** SHA calculate 2078 2078 2079 -** Function name:**2079 +**Parameter:** 2080 2080 2081 - sha:2081 +hash_func: use hash algorithm 2082 2082 2083 -* sha1, sha224, sha256, sha384, sha512] 2083 +* [md5, sha1, sha224, sha256, sha384, sha512] 2084 2084 * [sha512_224, sha512_256, sha3_224, sha3_256] 2085 2085 * [sha3_384, sha3_512] 2086 2086 2087 -**Parameter:** 2088 - 2089 2089 key: the key 2090 2090 2091 2091 message: message content ... ... @@ -2095,17 +2095,3 @@ 2095 2095 Succeed: string, calculation result 2096 2096 2097 2097 Failed: nil 2098 - 2099 -For example: 2100 - 2101 -{{code language="LUA"}} 2102 -local sha = require"sha2" 2103 - 2104 -function sha_test.main() 2105 - 2106 -local sha256 = sha.sha256 2107 - 2108 -print(sha256("your message")) 2109 - 2110 -end 2111 -{{/code}}