Skip to content

A script can convert encrypt or decrypt all text-based data using the xor algorithm on lua.

License

Notifications You must be signed in to change notification settings

BaziForYou/cfx-xor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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

image

Resource preview

Script Tested

image

Other Tools Tested

image

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 know whats xor and how use that on your resources
  • Brain

Download & Installation

Installation

Install as script
  • Add this in your server.cfg in 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

About

A script can convert encrypt or decrypt all text-based data using the xor algorithm on lua.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages