Exemple #1
0
        /****************************************************************************/
        public byte[] ToArray()
        {
            using (BinaryList aList = new BinaryList())
            {
                aList.Add(_key);
                aList.Add(_IV);

                return(aList.ToArray());
            }
        }
Exemple #2
0
 void AddTweet(TweetData data)
 {
     tweets.Add(data);
 }
Exemple #3
0
        private IEnumerable<byte> ReadBits(int byteCount)
        {
            BinaryList data = new BinaryList();

            LockedBitmap lockedBmp = new LockedBitmap(BitmapImage);
            lockedBmp.LockBits();

            int bitIndex = 0;
            for (int pixelIndex = Seed[0]; bitIndex < byteCount * 8; pixelIndex += (Seed[bitIndex % Seed.Count] + 1)) {
                BinaryOctet octet = lockedBmp.GetPixelArgb(pixelIndex)[(int)Color];

                for (byte currBit = 0; currBit < lsb; ++currBit, ++bitIndex)
                    data.Add(octet[currBit]);
            }

            lockedBmp.UnlockBits();
            
            return data.ToBytes(InvertBits);
        }