Skip to content

Instantly share code, notes, and snippets.

View Ichsan-06's full-sized avatar
🎯
Focusing

M Ichsan Ichsan-06

🎯
Focusing
  • Medan, Indonesia
View GitHub Profile
@VasilSlavchev
VasilSlavchev / encrypt-decrypt.php
Created October 13, 2020 00:56 — forked from oropesa/encrypt-decrypt.php
Encrypt and decrypt md5 in php
$input = "SmackFactory";
$encrypted = encryptIt( $input );
$decrypted = decryptIt( $encrypted );
echo $encrypted . '<br />' . $decrypted;
function encryptIt( $q ) {
$cryptKey = 'qJB0rGtIn5UB1xG03efyCp';
$qEncoded = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) );