title: How to return byte[] when decrypt using CryptoStream (DESCryptoServiceProvider)
body: <p>This is a beginner question, </p>
  
  <p>Every time I search on the internet, decrypt with <code>DESCryptoServiceProvider</code> function always returning a string. </p>
  
  <p>How can we get <code>byte[]</code> for the return? </p>
  
  <p>This is the code. Thank you for any help.</p>
  
  <pre><code>DESCryptoServiceProvider cryptoProvider = new DESCryptoServiceProvider();
  cryptoProvider.Padding = PaddingMode.None;
  cryptoProvider.Mode = CipherMode.CBC;
  
  MemoryStream memoryStream = new MemoryStream(value);
  CryptoStream cryptoStream = new CryptoStream(memoryStream, 
  cryptoProvider.CreateDecryptor(password, initVector), CryptoStreamMode.Read);
  StreamReader reader = new StreamReader(cryptoStream);
  
  return reader.ReadToEnd();            
  //how to return byte[];
  </code></pre>