Expands the base64 representation into a UUID byte array
| 78 | |
| 79 | // Expands the base64 representation into a UUID byte array |
| 80 | void expand(const std::string& s, std::vector<unsigned char>& v) { |
| 81 | v.push_back((unsigned char)from_base64(s.substr(0, 2))); |
| 82 | for (unsigned i = 0; i < 5; ++i) { |
| 83 | unsigned d = from_base64(s.substr(2 + 4 * i, 4)); |
| 84 | for (unsigned j = 0; j < 3; ++j) { |
| 85 | v.push_back((d >> (8 * (2 - j))) % 256); |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // Define the macro to handle different Boost versions |
| 91 | #if BOOST_VERSION >= 108600 |
no test coverage detected