Search code examples
c#imagebytesteganography

How to hide audio file inside image


I'm working on a stenography program where i need to hide audio file inside image. To implement that i need to CONVERT AUDIO FILE INTO BYTES[].

I thought of taking each byte and hide it inside each pixel of image. For that i would me needing some extra images to do so. But the problem is that i don't know how to take the audio file and take each byte out of that. I have implemented the same with text file but i have no idea with the audio file. Can anyone please help me with my doubts.


Solution

  • Reading the bytes from an audio file doesn't differ from reading bytes of any other file:

    byte[] bytes = System.IO.File.ReadAllBytes("myAudioFile.mp3");