3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $hash = md5('test'); $s =encrypt_blowfish('123123123123', $hash); $w =decrypt_blowfish($s, $hash); echo $s; echo $w; function decrypt_blowfish($data, $key) { $iv = pack("H*", substr($data, 0, 16)); $x = pack("H*", substr($data, 16)); $res = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $x, MCRYPT_MODE_CBC, $iv); return $res; } function encrypt_blowfish($data, $key) { $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $crypttext = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_CBC, $iv); return bin2hex($iv . $crypttext); }
based on HTmp1
Output for 7.0.6 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function mcrypt_get_iv_size() in /in/kd1Kc:17 Stack trace: #0 /in/kd1Kc(3): encrypt_blowfish('123123123123', '098f6bcd4621d37...') #1 {main} thrown in /in/kd1Kc on line 17
Process exited with code 255.
Output for 7.0.5
b2f42369937c0ea8dae767f53640f227aa8c2f01e708f347123123123123
Output for 7.0.4
aca85db93c9d45ebdeb1eb6647ea9a60431c26c6761cf271123123123123
Output for 7.0.3
979658f058f31c5b5f531ec30647ef2501c6abf7c3face67123123123123
Output for 7.0.2
78199a156753a90f7d0c657f0f3405ef647c7197baf3130d123123123123
Output for 7.0.1
9a5cd70ecfa719ed29396f1f9db2339950a54030f826ee3b123123123123
Output for 7.0.0
b532837c817d963f222f36941a11e73401e4017285920fb8123123123123
Output for 5.3.18 - 5.3.29, 5.5.35, 5.6.21 - 5.6.28
Fatal error: Call to undefined function mcrypt_get_iv_size() in /in/kd1Kc on line 17
Process exited with code 255.
Output for 5.6.20
368ba1d28cdba7630233d4c503d546323bb7333e82c9b8cf123123123123
Output for 5.6.19
fb1a0d92cc7a66327aca2aa223dfb08671a8b7df8a5b6d44123123123123
Output for 5.6.18
3631df2a33a3d17aae4a0adf856b4a3302b648e488792568123123123123
Output for 5.6.17
e8034d656b673f5bb7e51581475c6454e2ae42c52c41ccec123123123123
Output for 5.6.16
1cb1a7ae3461c44cd8d5de1720644c48d4a1af607d65cce1123123123123
Output for 5.6.15
f5725582ecb747ab63d4a2f5e17a18f260fd5bc5a318fc1a123123123123
Output for 5.6.14
37d7aefd5bd10e52d126f5f4750a4ffdc369777c9f4e82c1123123123123
Output for 5.6.13
386f8213727b24389f18416cd4962ac748f24decd2b84c28123123123123
Output for 5.6.12
ad4420d70c734769433517f725b21ddf4010d3536e0cb46b123123123123
Output for 5.6.11
33004c2483e7b762f3f7073115390b83e0821604d7a60552123123123123
Output for 5.6.10
6a4756fe3e19806346f5ae171d02943b4363b557887d01bc123123123123
Output for 5.6.9
6d52ae38553b1545ff06a2b25c2a794c1464ac13e3010729123123123123
Output for 5.6.8
ae983b6ad601d6b403c1beb8d7185ff1cd04ae3e862b0dfa123123123123
Output for 5.6.7
b8a2abe5a5a015181afa367ed62368b887738c344b62670b123123123123
Output for 5.5.34
1fb33862347da9521eae49474b342818749490db68341bc9123123123123
Output for 5.5.33
8f222bc01f771bfce9c54f74c1791e28d48053bc04999bcf123123123123
Output for 5.5.32
4ad14811008cb163fb9c32b435cd459020e0f76e5549cf59123123123123
Output for 5.5.31
221fc61f06b7c3d961fe553e97f0baa77c9f57175ff332b1123123123123
Output for 5.5.30
18736ab4e0165e07da84fa47ef6f3579a76a2a1a98e7ee31123123123123
Output for 5.5.29
4ff715fb0fabc8e06c8856c927fbfcf142b9431375eeabf6123123123123
Output for 5.5.28
77d4e69ea825d1e27ae3de8e5fa616d55e834b050c06a79e123123123123
Output for 5.5.27
c4e07e9e3c021610e8304b9098f9f15a1700e0f25e9f3fc7123123123123
Output for 5.5.26
dfc758551386f5968e4c7283f2062e3b4afdf024398368a4123123123123
Output for 5.5.25
a645ef5c122e6c1522ae522af649c3c367e5b26e7ed2ae7f123123123123
Output for 5.5.24
4871e51198b2b3076fbfe6eba41fb9499777b96838240a7a123123123123
Output for 5.4.45
9891c23b52003bfd2e15ef05ce52f749106d7b1161e78f68123123123123
Output for 5.4.44
0433cb155756b3720a4cc392a7ddde1ef957d24707889e53123123123123
Output for 5.4.43
218f8fdb67540b00f6ed32cd65182f7e4957bcae3633bd2f123123123123
Output for 5.4.42
4be0b858bf4b63fbcd267e8e7f56a9289cff41e62b5b92bc123123123123
Output for 5.4.41
fe1c5e134aafc3cd6bf56a9e29ae6f6f753e8cdae56ce3b3123123123123
Output for 5.4.40
643eeb02ba3e92d1639d34d6c698518e9176501ee16cf740123123123123
Output for 5.4.39
de9eb35806fc2e1f9e342383531fce3f960d935871df24ae123123123123
Output for 5.4.38
6d7600662f070add4b420950df8d84f2caefd7df9f848da3123123123123
Output for 5.4.37
d96c8f612712ec0fe7cb24d6fe238dfc2e6959d6ec11a927123123123123
Output for 5.4.36
46700640648c62db0f54755ae6f26e9a5c4f3d12113ca084123123123123
Output for 5.4.35
fe08cc2871623d211f77724e9081a8329e11140b0ea7c792123123123123
Output for 5.4.34
2d1a96d6957c10631aa4939fdc98f2c9df6dda4d81bd47af123123123123
Output for 5.4.32
d046e11e17a9334e0ae2cb1a6fb768334bc16139759b74d5123123123123
Output for 5.4.31
9bbbf6b6c612e055709053587d050f2f45217663b5302589123123123123
Output for 5.4.30
db5208fab789542329a27cd47a8b083596e774c34a6acb20123123123123
Output for 5.4.29
9daee4149a5e83f2b517cc854453fa69edda42774fd14e90123123123123
Output for 5.4.28
0fcf9d9a6f52f75a714878bab164c3e5d1b650a6f4c7cfad123123123123
Output for 5.4.27
3b9a7586ab07b74be0bae053c8e35511e9998aacaf531083123123123123
Output for 5.4.26
dd309f43c28e75c7e84ba2fdd72e82aadca6b2977a92fcc6123123123123
Output for 5.4.25
27d00800c04d7faacdbda95cceb6df51b675c157ad722c7d123123123123
Output for 5.4.24
7af475197ade0a3a4776bc4cdc84e678999bbf6922664898123123123123
Output for 5.4.23
78004605d71a9e8997dc83c62745dc567d5c8f5eabdb5d6e123123123123
Output for 5.4.22
db6958fc3ac152b4e9fa97e320fecf2133758e967072d3d0123123123123
Output for 5.4.21
a82bcc6b5bfb3057b4c788fc45d42eecdae1418163768aa5123123123123
Output for 5.4.20
29c072fd86e24e9d85bba1b930ea7497f92bdf988813ef8a123123123123
Output for 5.4.19
641a9a89dcfa9aed3f59848c41bcfdd870ced5686b3b2dac123123123123
Output for 5.4.18
9f0bd628c179876e29375462df09abd1caba1bcf02030000123123123123
Output for 5.4.17
3cf988441dd0c45f412fcf475d1f3225cd801993b0032179123123123123
Output for 5.4.16
8198445f1bd7d99dcf73560893e3f86ad122ff762a792ef1123123123123
Output for 5.4.15
73f6e41e524225a5a1e630b9cf2f42ce4134edd1c803e8be123123123123
Output for 5.4.14
a0b86805e3ef99b93a5e60c1db5c97b0a697755ae6e0681b123123123123
Output for 5.4.13
9476d7d20f8aeb445e892d809d23ff4b0e782db689fdc061123123123123
Output for 5.4.12
602a2892d67b91150328612b832b7c736c630782c572e22e123123123123
Output for 5.4.11
272728a1f8956944b78a44f96e56c44e5002084074e6eff3123123123123
Output for 5.4.10
d19d24f91fc2299512ce388aa388d6c14f8f0dcadc1d59a5123123123123
Output for 5.4.9
bce51c294afdcbd6c8971ee9f844f7150bed9207e0c78eaf123123123123
Output for 5.4.8
5c573487cec4657879d49451496f716b08212301384e860f123123123123
Output for 5.4.7
64bed92c3c8694f74cf35a70d5fa543f45876b7db690d9bf123123123123
Output for 5.4.6
8ae7f38b3714f229b80aeccf1d78e8dcad6cbd859d0a2905123123123123
Output for 5.4.5
6f7b032f90da928b836ff23a407b52b5b6d08f407b8a1692123123123123
Output for 5.4.4
8b1fd9bb8694426800c9f8503e13b0dae7beca1df0621689123123123123
Output for 5.4.3
04d284a6392e67b19ae38e5838df13dba9dbbbaa669c0784123123123123
Output for 5.4.2
95e307de57314e0d3e5ff1ad1c7d482ab55aad00deb1f618123123123123