An encryption tool that leverages base64 decode in encryption and decryption of data
Simply include the src.php file in your script and then harness the various functions therein. AlgoEncrypt involves support for OOP and Procedural paradigms. To use OOP, simply create an instance of the class Algo, which has three methods. encrypt(), decrypt() and verify(). In the procedural paradigm, you use algo_hash() function and the algo_verfify function only.
The first step is including the script in your project thus;
include("./AlgoEncrypt/src.php");
To use the OOP functions, you have to create an instance of the class thus;
$algo = new Algo();
Then, you use the methods of the class in encryption, verification and decryption.
To encrypt, use;
$algo->encrypt($string);
Where $string is a string-typed variable.
To encrypt, use;
$algo->decrypt($string);
Where $string is a string-typed hashed value (generated from AlgoEncrypt).
To verify a string to match with a hash, use;
$algo->verify($hash, $string);
Where $string is a string-typed variable and $hash is the hashed value to match/compare with for likeness. It returns true if matched properly, else returns false;
There are two functions usable in the procedural technique (for those who hate OOP 😉😉), which are algo_hash() and algo_verify(). It still depends on the Algo() class by the way.
This is used to hash a string, thus;
algo_hash($string);
Where $string is a string-typed variable.
This is similar to the verify() method (function) in the Algo class, thus;
algo_verify($hash, $string);
Where $string is a string-typed variable and $hash is the hashed value to match/compare with for likeness. It returns true if matched properly, else returns false;
Installation is very simple. Just clone this repository, and then include it in whichever script you want to use as shown above. Thanks
Well, JsonQL was built wholly by me. You could buy me a cup of coffee. Contact me also via +2348117093601. I am a founding member and CEO of Fussion DEV (fussiondev@gmail.com)