static byte[] extract_hash(FlipCircleQueue fcq) { Node node = fcq.head; byte[] sums = new byte[QUEUE_SIZE / 16]; for (int i = 0; i < QUEUE_SIZE; i++) { sums [i / 16] = (byte)(sums [i / 16] ^ (byte)node.value); node = fcq.get_next(node); } return(sums); }
static string extract_hash(FlipCircleQueue fcq) { Node node = fcq.head; byte[] sums = new byte[QUEUE_SIZE / 16]; for (int i = 0; i < QUEUE_SIZE; i++) { sums [i / 16] = (byte)(sums [i / 16] ^ (byte)node.value); node = fcq.get_next(node); } return(BitConverter.ToString(sums).Replace("-", "").ToLower()); }
public void merge(FlipCircleQueue other) { Node node = other.head; while (true) { Node next_node = other.get_next(node); this.add_node(node); if (next_node == other.head) { break; } node = next_node; } }