private static int CalculateWeakSum(byte[] buf) { Rollsum rollsum = new Rollsum(); rollsum.Update(buf); return(rollsum.Digest); }
private static void ReadNewBlock(BinaryReader inputStream, int blockLength, out Queue <byte> newBlock, out Rollsum newRollsum) { var newBlockBytes = inputStream.ReadBytes(blockLength); newBlock = new Queue <byte>(newBlockBytes); newRollsum = new Rollsum(); newRollsum.Update(newBlockBytes); }
private static void ReadNewBlock(BinaryReader inputStream, int blockLength, out Queue <byte> newBlock, out Rollsum newRollsum) { byte[] array = inputStream.ReadBytes(blockLength); int num = array.Length; newBlock = new Queue <byte>(num); for (int i = 0; i < num; i++) { newBlock.Enqueue(array[i]); } newRollsum = new Rollsum(); newRollsum.Update(array); }
private static int CalculateWeakSum(byte[] buf) { Rollsum sum = new Rollsum(); sum.Update(buf); return sum.Digest; }
private static void ReadNewBlock(BinaryReader inputStream, int blockLength, out Queue<byte> newBlock, out Rollsum newRollsum) { var newBlockBytes = inputStream.ReadBytes(blockLength); newBlock = new Queue<byte>(newBlockBytes); newRollsum = new Rollsum(); newRollsum.Update(newBlockBytes); }