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
-
... ... @@ -1834,7 +1834,7 @@ 1834 1834 1835 1835 Succeed: string: The value of the monitor point before it is written 1836 1836 1837 -Failed: nil1837 +Failed: mil 1838 1838 1839 1839 == **normal_getdata_byname(string name)** == 1840 1840 ... ... @@ -1850,7 +1850,7 @@ 1850 1850 1851 1851 Succeed: string 1852 1852 1853 -Failed: nil1853 +Failed: mil 1854 1854 1855 1855 = **11 MySQL database operation** = 1856 1856 ... ... @@ -1890,7 +1890,7 @@ 1890 1890 1891 1891 Succeed: status: returns the number of rows affected by SQL statement execution. 1892 1892 1893 -Failed: nil, errorString1893 +Failed: mil, errorString 1894 1894 1895 1895 == **luaMySql.execWithResult(string statement)** == 1896 1896 ... ... @@ -1904,7 +1904,7 @@ 1904 1904 1905 1905 Succeed: table: returns the result set 1906 1906 1907 -Failed: nil, errorString1907 +Failed: mil, errorString 1908 1908 1909 1909 For example: 1910 1910 ... ... @@ -2034,62 +2034,14 @@ 2034 2034 2035 2035 == **hmac(string hash_func, string key, string message)** == 2036 2036 2037 -**Function:** HMACcalculate2037 +**Function:** Execute the given SQL statement returning the result set (check) 2038 2038 2039 -**Function name** 2040 - 2041 -hash_func: use hash algorithm 2042 - 2043 -* [md5, sha1, sha224, sha256, sha384, sha512] 2044 -* [sha512_224, sha512_256, sha3_224, sha3_256] 2045 -* [sha3_384, sha3_512] 2046 - 2047 2047 **Parameter:** 2048 2048 2049 - key: thekey2041 +statement: the given SQL statement 2050 2050 2051 -message: message content 2052 - 2053 2053 **Return:** 2054 2054 2055 -Succeed: string, calculation result2045 +Succeed: table: returns the result set 2056 2056 2057 -Failed: nil 2058 - 2059 -For example: 2060 - 2061 -{{code language="LUA"}} 2062 -local sha = require"sha2" 2063 - 2064 -function hmac_test.main() 2065 - 2066 -local hmac = sha.hmac 2067 - 2068 -print(hmac(sha.sha1, 2069 - 2070 -"your key", "your message")) 2071 - 2072 -end 2073 -{{/code}} 2074 - 2075 -== **sha(string message** == 2076 - 2077 -**Function:** SHA calculate 2078 - 2079 -**Parameter:** 2080 - 2081 -hash_func: use hash algorithm 2082 - 2083 -* [md5, sha1, sha224, sha256, sha384, sha512] 2084 -* [sha512_224, sha512_256, sha3_224, sha3_256] 2085 -* [sha3_384, sha3_512] 2086 - 2087 -key: the key 2088 - 2089 -message: message content 2090 - 2091 -**Return:** 2092 - 2093 -Succeed: string, calculation result 2094 - 2095 -Failed: nil 2047 +Failed: mil, errorString