title: PHP script for DES/CBC/ with PKCS5Padding encryption and decryption
body: <p>I would like to know in the following code if PKCS#5 padding is added ? If not how to add ?</p>
  
  <pre><code>$message = "insert plaintext message here";
  
  $iv  = pack('H*', 'insert hex iv here');
  $key = pack('H*', 'insert hex key here');
  
  $enc = mcrypt_encrypt(MCRYPT_DES, $key, $message, MCRYPT_MODE_CBC, $iv);
  
  echo bin2hex($enc);
  </code></pre>
  
  <p>I also want to create a PHP code to decrypt a string created with DES/CBC/PKCS5Padding. I think the above mentioned code can be modified to get a decryption.</p>
  
  <p>The important thing for me is to get the PKCS#5 Padding and Unpadding script.</p>