xxtea - xxtea encryption and decryption#

Adapted Air780E Air780EP Air780EPS

Note

This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!

Example

-- This library is for https://github.com/xxtea/xxtea-c的封装, thanks again to the author of xxtea

local text = "Hello World!"
local key = "07946"
local encrypt_data = xxtea.encrypt(text, key)
log.info("testCrypto.xxteaTest","xxtea_encrypt:"..encrypt_data)
local decrypt_data = xxtea.decrypt(encrypt_data, key)
log.info("testCrypto.xxteaTest","decrypt_data:"..decrypt_data)

xxtea.encrypt(data, key)#

Encryption

Parameters

Incoming Value Type

Explanation

string

data Data to be encrypted

string

key Key for encryption

Return Value

return value type

explanation

string

Encrypted data, returned on failure nil

Examples

None


xxtea.decrypt(data, key)#

Decryption

Parameters

Incoming Value Type

Explanation

string

data Data to be decoded

string

key Key for decryption

Return Value

return value type

explanation

string

The decrypted data is returned on failure.nil

Examples

None