Exemplo n.º 1
0
bool operator==(const Binary &left, const Binary &right) {
	unsigned char* leftBuffer = left.Buffer();
	unsigned char* rightBuffer = right.Buffer();
	size_t leftLen = left.BufferLength();
	size_t rightLen = right.BufferLength();

	if (leftLen != rightLen) return false;

	for (size_t i = 0; i < leftLen; i++) {
		if (leftBuffer[i] != rightBuffer[i]) return false;
	}
	return true;
}
Exemplo n.º 2
0
INLINE void Write(Binary  const &a) {
    WriteHex(a.Buffer(), a.Length());
}