コード例 #1
0
 public MemoryByteQuadruple(Color current) : this()
 {
     A = current.A;
     R = current.R;
     G = current.G;
     B = current.B;
 }
コード例 #2
0
        /// <summary>
        /// It stores confidential information in the byte.
        /// </summary>
        /// <param name="data">Confidential information</param>
        /// <param name="key">Encryption key</param>
        public void Inject(byte data, int?key)
        {
            if (key.HasValue)
            {
                data = (byte)(data ^ key.Value);
            }

            MemoryWatch memoryWatcher = data;

            A[LSB1] = memoryWatcher[0];
            A[LSB2] = memoryWatcher[1];

            R[LSB1] = memoryWatcher[2];
            R[LSB2] = memoryWatcher[3];

            G[LSB1] = memoryWatcher[4];
            G[LSB2] = memoryWatcher[5];

            B[LSB1] = memoryWatcher[6];
            B[LSB2] = memoryWatcher[7];
        }