title: System.Text.Encoding.UTF8.GetBytes(s) different values for a string on the same computer, different programs
body: <p>I'm doing a</p>
  
  <pre><code>System.Text.Encoding.UTF8.GetBytes(s) 
  </code></pre>
  
  <p>on a string in two different programs (one console, one web) using .NET 2.0 framework and the encoding is coming back different from the two. For the string "everything" I get the same result, but for the string "OnI3UwUc" I get two different results.</p>
  
  <p>For The "OnI3UwUc", 6f6e693375777563
  For the "OnI3UwUc" in another program, I get 4f63493355775563.</p>
  
  <p>In the </p>
  
  <p>I tried to write this to operate the same as some Classic ASP code I have:</p>
  
  <pre><code>Dim crypt : Set crypt = CreateObject("Chilkat.Crypt2")      
  crypt.UnlockComponent("TXTECHCrypt_6X6EnMdFNRCe") 
  crypt.HashAlgorithm = "sha1"  
  crypt.CryptAlgorithm = "aes" 
  crypt.CipherMode = "ecb" 
  crypt.EncodingMode = "hex" 
  crypt.SetEncodedKey "100202330405560608790A8B0C9D0EAF","hex" 
  </code></pre>