- 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
More info
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)
Target Text: My Name Is BaziForYou
Target Key: BZY
- Need know whats xor and how use that on your resources
- Brain
- Download https://github.com/BaziForYou/cfx-xor/archive/main.zip
- Put it in the
resources
folder
- Add this in your
server.cfg
in the following order:
start cfx-xor
- add this to your resource manifest
shared_script '@cfx-xor/xor.lua'
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 |
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")
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")