title: How to decrypt audio file in the form of stream in Flutter/Dart?
body: <p><strong>Project Requirement:</strong> Music player app which will download audio files, encrypt and save them. The audio files should be playable in the app only. No other app should be able to play the files. Nor the user should be able to copy the files.</p>
  <p><strong>Approach:</strong> I don't want the entire decryted audio file to exist at any moment. So I want to encrypt the audio file as soon as it is downloaded. Then when the file is to be played, I want it to be decrypted chunk-by-chunk and played. I believe this can be achieved by using stream. As far as I searched, a package named &quot;just_audio&quot; can play the audio from stream source.</p>
  <p><strong>Problem:</strong> I cannot find any encryption package for Flutter/Dart which will output the decrypted data in the form of a stream. This is the first time I am trying to implement encryption/decryption, so my knowledge is very poor in this regard.</p>
  <p><strong>Notes:</strong></p>
  <ol>
  <li>The encryption does not need to be heavy. A typical user not being able to copy the files and play them elsewhere would suffice.</li>
  <li>Audio files are going to be large, some of them even hours in length.</li>
  <li>I need all the usual functions of a music player (e.g. albums, playlists, progress bars with seeking function, etc.)</li>
  </ol>
  <p><strong>Options:</strong></p>
  <ol>
  <li>It will be best if there is a package which can do what I need, off the shelf.</li>
  <li>To find a basic package and then modifying it into doing what is needed.</li>
  <li>Some radically different solution, which takes entirely different path but provides all the solutions.</li>
  </ol>