test_mcrypt.php

  1. <?php
  2.  
  3. ini_set('display_errors', 1);
  4.  
  5. header("Content-Type: text/plain");
  6. $text = 'The chicken escapes at dawn. Send help with Mr. Blue.';
  7.  
  8. require_once "CypherMCrypt.php";
  9. echo "MCrypt\n\n";
  10. $encoded = CypherMCrypt::encode($text);
  11. echo "ENCODED=|$encoded|".strlen($encoded)."\n\n";
  12. $decoded = CypherMCrypt::decode($encoded);
  13. echo "DECODED=|$decoded|".strlen($decoded)."\n\n";
  14.  

Proinf.net