Raised This Month: $ Target: $400
 0% 

String Encryptor API


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 01-12-2024 , 05:39   String Encryptor API
Reply With Quote #1

String Encryptor API
- v0.0.1, published at : 12/01/2024


Description
A simple tool to encrypt your string data. This allows you to encrypt by using Caeser Cipher, X0R and Fibonacci.


How to use it
PHP Code:
enum {
    
Caeser_Cipher,
    
X0R,
    
Fibonacci
}

/**
 * Encrypt a String
 *
 * @param iMethod    Caeser_Cipher / X0R / Fibonacci
 * @param szInput    Original String
 * @param szOutput    Output (Encrypted)
 * @param iMaxLen    Output Max Lenght
 * @param iKey        Used for X0R & Caeser Cipher Methods
 */
native str_encrypt(iMethod, const szInput[], szOutput[], iMaxLeniKey 0)

/**
 * Decrypt a String
 *
 * @param iMethod    Caeser_Cipher / X0R / Fibonacci
 * @param szInput    Encrypted String
 * @param szOutput    Output (Decrypted String)
 * @param iMaxLen    Output Max Lenght
 * @param iKey        Used for X0R & Caeser Cipher Methods
 */
native str_decrypt(iMethod, const szInput[], szOutput[], iMaxLeniKey 0
The important note here is the iKey.
  • Fibonacci does not require a key.
  • On Caeser Cipher you must use a key. I would recommend a value between 2 and 10.
  • On X0R method you should also use a key, you can find bellow some key examples.


X0R Example Keys
  • 0x42
  • 0x7F
  • 0xAA
  • 0xF0
  • 0x88
  • 0xC5
  • 0x3E
  • 0xD7
Attached Files
File Type: sma Get Plugin or Get Source (encryptor_api.sma - 90 views - 1.9 KB)
File Type: inc encryptor.inc (798 Bytes, 30 views)
__________________

Last edited by Jhob94; 01-12-2024 at 05:41.
Jhob94 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode