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])); }
public void ToBytes_ConvertsToBytes_Converted() { uint word = 1305570306; byte[] excepted = { 2, 108, 209, 77 }; CollectionAssert.AreEqual(excepted, Word32Bits.ToBytes(word)); }
public void ToBytes_ConvertsToBytesLittleEndian_Converted() { uint word = 40685901; byte[] excepted = { 2, 108, 209, 77 }; CollectionAssert.AreEqual(excepted, Word32Bits.ToBytes(word, ValueRepresentation.LittleEndian)); }
public void WriteWords(uint[] words) { foreach (var word in words) { WriteBytes(Word32Bits.ToBytes(word)); } }