Hi,

I'm running php v4.3.2 on win2k. I'm trying to use mcrypt. However it hangs
when I try to decrypt. I googled on this and I have seen other postings for
the exact same thing but no answers. This code works if everything after
//decrypt is commented out.

<?php
//encrypt 
   $iv_size = mcrypt_get_iv_size(MCRYPT_CAST_256, MCRYPT_MODE_ECB);
   $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
   $key = "This is a very secret key";
   $text = "Meet me at 11 o'clock behind the monument.";
   echo strlen($text)."<br><br>\n";

   $crypttext = mcrypt_encrypt(MCRYPT_CAST_256, $key, $text,
MCRYPT_MODE_ECB, $iv);
   echo strlen($crypttext)."<br><br>\n";
   echo $crypttext."<br><br>\n";

//decrypt    
    $decrypttext = mcrypt_decrypt(MCRYPT_CAST_256, $key, $crypttext,
MCRYPT_MODE_ECB, $iv);
    echo "$decrypttext<br>";

// end
?> 

any ideas on how to get 'mcrypt_decrypt()' to not hang.

Mike
-- 
Mike Brandonisio          *    Web Hosting
Tech One Illustration     *    Database Applications
tel (630) 759-9283        *    e-Commerce
[EMAIL PROTECTED]    *    http://www.jikometrix.net

    JIKOmetrix - Reliable web hosting



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to