Functions
| Function | Returns | Description |
|---|---|---|
utils.base64_encode(data) | string | Base64 encode |
utils.base64_decode(text) | string | Base64 decode |
utils.fnv1a(text) | number | FNV-1a hash |
utils.murmur2(text [, seed]) | number | MurmurHash2 |
utils.time() | number | Unix timestamp |
utils.date([format, time]) | string | Formatted date string |
Clipboard (insecure)
| Function | Returns | Description |
|---|---|---|
utils.clipboard_get() | string | Read clipboard |
utils.clipboard_set(text) | bool | Write to clipboard |
Example
local hash = utils.fnv1a('weapon_ak47')
print(string.format('0x%08X', hash))
print(utils.date('%Y-%m-%d %H:%M:%S'))