Created
January 18, 2016 15:03
-
-
Save ql/4c3604cca61faf407187 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = "foobar"; | |
//$IvSize = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC); | |
$IvSize = 10; | |
$IvPhrase = mcrypt_create_iv($IvSize, MCRYPT_RAND); | |
$key = "crypt key"; | |
$encoded = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, data, MCRYPT_MODE_CBC, $this->IvPhrase); | |
print base64_encode($encoded); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment