Advertisement
Guest User

Untitled

a guest
Nov 16th, 2012
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. string blowfish_pass = "KD921231X3123211";
  2. BlowFish b = new BlowFish(blowfish_pass);
  3. string res = b.Encrypt_CBC(EncryptedString);
  4.  
  5.  
  6. //php:
  7. $blowfish_key = "KD921231X3123211":
  8.  
  9. $cs_output="27c7c634ead1d28bfe64821a28ef909311e1f655150f24eec27abff1376a7a8712e7962fdbb0150bfc0882078cb99e67";
  10.  
  11. $iv=pack("H*" , substr($cs_output,0,16));
  12. $blowfish_key=pack("H*" , $blowfish_key); // key in this example is all zero
  13. $x =pack("H*" , substr($cs_output,16));
  14. $data = mcrypt_decrypt(MCRYPT_BLOWFISH, $blowfish_key, $x , MCRYPT_MODE_CBC, $iv);
  15.  
  16. echo $data;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement