encryptionPHP
1.0.0
Ini adalah perpustakaan enkripsi PHP yang sangat sederhana. Anda dapat menggunakan perpustakaan ini untuk mengenkripsi atau mendekripsi string dengan kunci pribadi 16, 24, 32 karakter.
$enkripsi = Enkripsi baru( string $kunci );
// Include core encryption library from Src folder
require_once ' encryptionPHP .php ' ;
// Initialize encryption object
$ encryption = new Encryption ( ' bZKn8iklVOQr7eC8ONvnCeRFBJwWo1PG ' );
Mengenkripsi string untuk mengamankannya.
$enkripsi->enkripsi( string $teks, string $iv);
// iv() funcation for dynamic encrypted data
$ iv = $ encryption -> iv ();
// Encrypt a string
$ encrypted = $ encryption -> encrypt ( ' Today is a good day! ' , $ iv );
echo $ encrypted ;
Mendekripsi chiper terenkripsi.
string $enkripsi->dekripsi( string $ chiper.string $iv);
$ decrypted = $ encryption -> decrypt ( $ encrypted , $ iv );
echo $ decrypted ;
Hasil:
Today is a good day!
Catatan:
Use this code to encrypt the data into database