title: Encrypted mp3 streaming to Flash SWF
body: <p>I have an asp.net web site that serves sample MP3 files to client Flash Players (SWF).</p>
  
  <p>These files are downloadable by tons of download tools. </p>
  
  <p>Although only registered members can access the high quality mp3 samples, my client wants to prevent these low quality MP3 files to be downloaded by download tools.</p>
  
  <p>So I thought about this solution: </p>
  
  <ol>
  <li>Convert these MP3 files to bytearrays on server side (ASP.NET) </li>
  <li>Do some bitwise XOR operations (Simple encryption)</li>
  <li>Write this array to aspx' responsestream</li>
  <li>Modify Flash (.fla) to request to this new file/page/aspx</li>
  <li>Do some bitwise XOR operations on Flash and convert it to the original MP3 as byte array. (Simple decryption)</li>
  <li>Play the MP3</li>
  </ol>
  
  <p>I was able to succeed till step 6. I cannot convert this byte array to a Sound object that Flash can play. I did a bit by bit comparison of the resulting array on the flash and the source array on ASP.NET. They are <strong>equal</strong>.</p>
  
  <p>I'm open to completely different approaches. But I cannot use Flash Media Server. I need to be using Flash as3 and ASP.NET.</p>
  
  <p><strong>Also very important!</strong> The .mp3 must be downloaded/decrypted and played asynchronously (which I coud not succeed in doing)</p>