tam bir dosya şifreleme için Mcrypt

0 Cevap php

Ben böyle mcrypt kullanıyorum

<?php
   $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_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) . "\n";

   $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
   echo strlen($crypttext) . "\n";
?>

Bu belirli bir metni şifrelemek için çalışıyor. Ancak şimdi bir dosyaya kaydetmek ve bu tam dosyayı şifrelemek gerekir. Php5 kullanma.

0 Cevap