| 220 | } |
| 221 | |
| 222 | int JLSRTP::xorVector(std::vector<unsigned char> &a, std::vector<unsigned char> &b, std::vector<unsigned char> &result) |
| 223 | { |
| 224 | int retVal = -1; |
| 225 | |
| 226 | if (a.size() == b.size()) |
| 227 | { |
| 228 | result.clear(); |
| 229 | result.resize(a.size()); |
| 230 | std::transform(a.begin(), a.end(), b.begin(), result.begin(), std::bit_xor<unsigned char>()); |
| 231 | retVal = 0; |
| 232 | } |
| 233 | else |
| 234 | { |
| 235 | retVal = -1; |
| 236 | } |
| 237 | |
| 238 | return retVal; |
| 239 | } |
| 240 | |
| 241 | int JLSRTP::isBigEndian() |
| 242 | { |