Steganografie/Encryption/BaseEncryption.cs
/// <summary>
/// Converts input string to
/// an array of bits
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Converts input string to
an array of bits
Converts input string to an array of bits
protected List<int> StringToBitsAscii(string input)
		{
			byte[] bytes = Encoding.ASCII.GetBytes(input);
			var bits = new BitArray(bytes);
			var bitsInInt = new List<int>();
			foreach (bool bit in bits)
			{
				bitsInInt.Add(Convert.ToInt32(bit));
			}
			return bitsInInt;
		}
protected List < int > StringToBitsAscii ( string input ) { byte [ ] bytes = Encoding . ASCII . GetBytes ( input ) ; var bits = new BitArray ( bytes ) ; var bitsInInt = new List < int > ( ) ; foreach ( bool bit in bits ) { bitsInInt . Add ( Convert . ToInt32 ( bit ) ) ; } return bitsInInt ; }
Converts input string to
an array of bits
Converts input string to an array of bits
None
input
string
None