deccryptage php
<p>i try de decrypt my file ,but i have this message </p>

<blockquote>
  <p>Warning: mcrypt_cbc() [function.mcrypt-cbc]: Size of key is too large
  for this algorithm in
  /Applications/XAMPP/xamppfiles/htdocs/test/test.php on line 32</p>
</blockquote>

<pre><code>&lt;?php

   $key = md5("Test");


           //fonction decode
           function decode($pass_coder)
           {
           $pass_str = mcrypt_ecb(MCRYPT_TripleDES,$key, $pass_coder, MCRYPT_DECRYPT);
           return $pass_str;
           }

     echo (decode($pass_coder));
    &gt;
</code></pre>

<p>i use this function to encrypt my file</p>

<pre><code>public void Encrypt(XmlDocument doc, string rootTag, string password)
       {
           // Transform password to MD5 hash value
           ASCIIEncoding enc = new ASCIIEncoding();
           MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
           byte[] md5val = md5.ComputeHash(enc.GetBytes(password));

           // Create key and use MD5 hash value as key
           TripleDES key = TripleDESCryptoServiceProvider.Create();
           key.Key = md5val;

           // Encrypt data
           EncryptedXml ec = new EncryptedXml(doc);
           ArrayList list = new ArrayList();
           foreach (XmlElement el in doc.GetElementsByTagName(rootTag))
           {
               byte[] data = ec.EncryptData(el, key, false);
               EncryptedData ed = new EncryptedData();
               ed.Type = EncryptedXml.XmlEncElementUrl;
               ed.EncryptionMethod = new EncryptionMethod(EncryptedXml
.XmlEncTripleDESUrl);
               ed.CipherData = new CipherData();
               ed.CipherData.CipherValue = data;
               list.Add(new object[] { el, ed });
           }

           // Write encrypted data to XML document
           foreach (object[] obj in list)
               EncryptedXml.ReplaceElement((XmlElement)obj[0], (
EncryptedData)obj[1], false);
       }
</code></pre>
