Files
MP-SPDZ/Tools/oct.h
Nikolaj Volgushev 881b4403ac SPDZ2k offline phase.
2019-03-26 18:36:55 +11:00

20 lines
436 B
C

#ifndef TOOLS_OCT_H_
#define TOOLS_OCT_H_
typedef unsigned char octet;
inline void PRINT_OCTET(const octet* bytes, size_t size) {
for (size_t i = 0; i < size; ++i)
cout << hex << (int) bytes[i];
cout << flush << endl;
}
inline bool OCTETS_EQUAL(const octet* left, const octet* right, int size) {
for (int i = 0; i < size; ++i)
if (left[i] != right[i])
return false;
return true;
}
#endif