Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string blowfish_pass = "KD921231X3123211";
- BlowFish b = new BlowFish(blowfish_pass);
- string res = b.Encrypt_CBC(EncryptedString);
- //php:
- $blowfish_key = "KD921231X3123211":
- $cs_output="27c7c634ead1d28bfe64821a28ef909311e1f655150f24eec27abff1376a7a8712e7962fdbb0150bfc0882078cb99e67";
- $iv=pack("H*" , substr($cs_output,0,16));
- $blowfish_key=pack("H*" , $blowfish_key); // key in this example is all zero
- $x =pack("H*" , substr($cs_output,16));
- $data = mcrypt_decrypt(MCRYPT_BLOWFISH, $blowfish_key, $x , MCRYPT_MODE_CBC, $iv);
- echo $data;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement