Steganografie/Encryption/BaseEncryption.cs
/// <summary>
/// Replaces the inputs last
/// bit with the value
/// </summary>
/// <param name="input"></param>
/// <param name="value"></param>
/// <returns></returns>
Replaces the inputs last
bit with the value
Replaces the inputs last bit with the value
private byte ReplaceLastBit(byte input, int value)
		{
			if (input % 2 == 0 && value == 1)
				input++;
			if (input % 2 == 1 && value == 0)
				input--;
			return input;
		}
private byte ReplaceLastBit ( byte input , int value ) { if ( input % 2 == 0 && value == 1 ) input ++ ; if ( input % 2 == 1 && value == 0 ) input -- ; return input ; }
Replaces the inputs last
bit with the value
Replaces the inputs last bit with the value
None
input
byte
None
value
int
None