Hello FiveM Community.
A script can convert encrypt or decrypt all text-based data using the xor algorithm.
Features
- Possible to Encode and also Decode data using the xor algorithm
- Support all string-based data to xor that (also for files can use file base64 to do xor on it this will be up to you how to do that)
- Standalone it doesn’t use any function from anywhere
- Optimize and get low usage (0.00 and max 0.01 on working)
- Clean coding
Simple Xor Explain

Resource preview
Script Tested

Other Tools Tested

More info
Example Code
local key = "BZY"
local enc,enc2 = XOR_Ecode("My Name Is BaziForYou",key)
print(json.encode(enc))
print(enc2)
local Dec,Dec2 = XOR_Decode(enc,key)
print(json.encode(Dec))
print(Dec2)
local Dec3,Dec4 = XOR_Decode(enc2,key)
print(json.encode(Dec3))
print(Dec4)
Used Data
Target Text: My Name Is BaziForYou
Target Key: BZY
Used Tools
Requirements
- Need to know what xor and how to use that on your resources
- Brain
Github
Download & Installation
- Download https://github.com/BaziForYou/cfx-xor/archive/main.zip
- Put it in the
resourcesfolder
Installation
Install as script
- Add this in your
server.cfgin the following order:
start cfx-xor
load as share file
- add this to your resource manifest
shared_script '@cfx-xor/xor.lua'
Exports
Client/Server
| Export | Description | Parameter(s) | Return type |
|---|---|---|---|
| XOR_Ecode | return xor encrypted data | sentString [string],sentKey [string],customSpace [optional string] | Table,String |
| XOR_Decode | return xor decrypted data | sentData [table or string],sentKey [string],customSpace [optional string] | Table,String |
Example
Using Export
local encTable,encString = exports["cfx-xor"]:XOR_Ecode("My Name Is BaziForYou", "BZY")
local decTable,decString = exports["cfx-xor"]:XOR_Decode("0F 23 79 0C 3B 34 27 7A 10 31 7A 1B 23 20 30 04 35 2B 1B 35 2C", "BZY")
Using as shared file
local encTable,encString = XOR_Ecode("My Name Is BaziForYou", "BZY")
local decTable,decString = XOR_Decode("0F 23 79 0C 3B 34 27 7A 10 31 7A 1B 23 20 30 04 35 2B 1B 35 2C", "BZY")
Credits
Additional info
| Code is accessible | Yes |
| Subscription-based | No |
| Lines (approximately) | ~ 67 lines |
| Requirements | Nothing special just brain |
| Support | Yes |