Steganografie/Encryption/BaseEncryption.cs
/// <summary>
/// Removes excess characters in a string
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
Removes excess characters in a string
Removes excess characters in a string
protected byte[] RemoveExcess(ref byte[] text)
		{
			var newtext = new List<byte>();
			for (int i = 0; i < text.Length; i++)
			{
				if (text[i] == 47 &&
					text[i + 1] == 33 &&
				    text[i + 2] == 63 &&
				    text[i + 3] == 42) break;
				newtext.Add(text[i]);
			}
			return newtext.ToArray();
		}
protected byte [ ] RemoveExcess ( ref byte [ ] text ) { var newtext = new List < byte > ( ) ; for ( int i = 0 ; i < text . Length ; i ++ ) { if ( text [ i ] == 47 && text [ i + 1 ] == 33 && text [ i + 2 ] == 63 && text [ i + 3 ] == 42 ) break ; newtext . Add ( text [ i ] ) ; } return newtext . ToArray ( ) ; }
Removes excess characters in a string
Removes excess characters in a string
None
byte[]
ref
text
None