Click here to Skip to main content
15,891,473 members
Articles / Programming Languages / C#

Steganography 15 - Hiding Digital Data in Music on Audio Cassettes

Rate me:
Please Sign up or sign in to vote.
4.95/5 (41 votes)
4 Jun 2005CDDL6 min read 224.9K   6.7K   68  
How to hide data of any kind inside a sound, and keep it alive on an analog medium.
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace SteganoTape {
	[StructLayout(LayoutKind.Sequential)]
	public class WaveFormat {
        private short wFormatTag;
        private short nChannels;
        private int nSamplesPerSec;
        private int nAvgBytesPerSec;
        private short nBlockAlign;
        private short wBitsPerSample;
        private short cbSize;

        public short FormatTag
        {
            get { return wFormatTag; }
            set { wFormatTag = value; }
        }

        public short Channels
        {
            get { return nChannels; }
            set { nChannels = value; }
        }

        public int SamplesPerSec
        {
            get { return nSamplesPerSec; }
            set { nSamplesPerSec = value; }
        }

        public int AvgBytesPerSec
        {
            //get{ return nSamplesPerSec * nBlockAlign; }
            get { return nAvgBytesPerSec; }
            set { nAvgBytesPerSec = value; }
        }

        public short BlockAlign
        {
            //get { return (short)(nChannels * (wBitsPerSample / 8)); }
            get{ return nBlockAlign; }
            set { nBlockAlign = value; }
        }

        public short BitsPerSample
        {
            get { return wBitsPerSample; }
            set { wBitsPerSample = value; }
        }

		public short Size
		{
			get { return cbSize; }
			set { cbSize = value; }
		}
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Software Developer
Germany Germany
Corinna lives in Hanover/Germany and works as a C# developer.

Comments and Discussions