A Java library for encrypting and decrypting text with AES
Please be sure you know what you are doing!
This is a 128 bit AES/ECB cipher! Not a military encryption!
You should only encrypt text!
Read more about ECB: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation
Create an object
CryptLib cipher = new CryptLib();
Printout encrypted string
System.out.println(">" + cipher.encrypt("Test", "Test1234Test1234") + "<");
Printout decrypted string
System.out.println(">" + cipher.decrypt("5c61eZ2k+CbeDThLD2bP/w==", "Test1234Test1234") + "<");
Output:
>5c61eZ2k+CbeDThLD2bP/w==<
>Test<
Or try out the PermKey function:
Create an object
CryptLib cipher = new CryptLib("Test1234Test1234");
Printout encrypted string
System.out.println(">" + cipher.encrypt("Test") + "<");
Printout decrypted string
System.out.println(">" + cipher.decrypt("5c61eZ2k+CbeDThLD2bP/w==") + "<");
Output:
>5c61eZ2k+CbeDThLD2bP/w==<
>Test<
This program is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.