title: DES Decoding in C# WP 8.1
body: <p>The System.Security.Cryptography does include a DES Decode method, but the Windows.Security.Cryptography Namespace for Windows Phone 8.1 programming doesn't include any method for decoding DES.</p>
  
  <p>I just found a Class, <code>Windows.Security.Cryptography.Core.SymmetricAlgorithmNames.DesCbc</code>,
  but I don't have any idea how to decrypt my DES encrypted String. I would appreciate every idea you have in your mind.</p>
  
  <p>I think I've got it.
  Code Snippet:</p>
  
  <pre><code>strAsymmetricAlgName = SymmetricAlgorithmNames.DesCbc;
  SymmetricKeyAlgorithmProvider objAlgProv = SymmetricKeyAlgorithmProvider.OpenAlgorithm(strAsymmetricAlgName);
  
  CryptographicKey keyPair = objAlgProv.CreateSymmetricKey(CryptographicBuffer.ConvertStringToBinary("xxx", BinaryStringEncoding.Utf8));
  
  IBuffer val = CryptographicEngine.Decrypt(keyPair, CryptographicBuffer.ConvertStringToBinary(encodedData, BinaryStringEncoding.Utf8), null);
  
  byte[] arr = val.ToArray();
  
  string returnValue = System.Text.Encoding.UTF8.GetString(arr, 0, arr.Length);
  </code></pre>
  
  <p>I currently don't know the  initialization vector that's why it is <code>null</code>.
  I am still not 100 % sure if that is right.
  The DES string is encrypted by a Java programm:</p>
  
  <pre><code>Cipher c = Cipher.getInstance( "DES" );
  Key k = new SecretKeySpec( pass.getBytes(), "DES" );
  c.init( Cipher.ENCRYPT_MODE, k );
  
  OutputStream cos = new CipherOutputStream( out, c );
  cos.write( bytes );
  cos.close()
  </code></pre>
  
  <p>I can't find any Information about the initialization vector.</p>