Exemplo n.º 1
0
 private void WriteBlock(uint[] K)
 {
     _byteWriter.WriteBytes(Word32Bits.ToBytes(K[2]));
     _byteWriter.WriteBytes(Word32Bits.ToBytes(K[3]));
     _byteWriter.WriteBytes(Word32Bits.ToBytes(K[0]));
     _byteWriter.WriteBytes(Word32Bits.ToBytes(K[1]));
 }
Exemplo n.º 2
0
        public void ToBytes_ConvertsToBytes_Converted()
        {
            uint word = 1305570306;

            byte[] excepted = { 2, 108, 209, 77 };
            CollectionAssert.AreEqual(excepted, Word32Bits.ToBytes(word));
        }
Exemplo n.º 3
0
        public void ToBytes_ConvertsToBytesLittleEndian_Converted()
        {
            uint word = 40685901;

            byte[] excepted = { 2, 108, 209, 77 };
            CollectionAssert.AreEqual(excepted, Word32Bits.ToBytes(word, ValueRepresentation.LittleEndian));
        }
Exemplo n.º 4
0
 public void WriteWords(uint[] words)
 {
     foreach (var word in words)
     {
         WriteBytes(Word32Bits.ToBytes(word));
     }
 }