-
Notifications
You must be signed in to change notification settings - Fork 0
Home
CABC is a simple cipher algorithm. It implements the Substitution principles by using arrays of characters. Suffling the arrays will cause the algorithm to generate different hashes. CABC can generate different hashes deppending on the Characters table selected.
To generate the hash for a String just create an instance of CabcAlgorithm
class, then pass the String as a parameter to wrapper
method. Example
CabcAlgorithm ca = new CabcAlgorithm();
String hash = ca.wrapper("Sandwich.");
System.out.println(hash);
The algorithm can generate (based on the actual characters tables) many hashes, but all of them have the same information.
To reverting the hash you can use the same instance of CabcAlgorithm
class, then pass the hash as a parameter to inverseCabc
method. Example
CabcAlgorithm ca = new CabcAlgorithm();
String myString = ca.inverseCabc("FA192F56324F3A315015");
System.out.println(myString);