MCPcopy Create free account
hub / github.com/ByConity/ByConity / transformUUID

Function transformUUID

programs/obfuscator/Obfuscator.cpp:368–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368static void transformUUID(const UUID & src_uuid, UUID & dst_uuid, UInt64 seed)
369{
370 const UInt128 & src = src_uuid.toUnderType();
371 UInt128 & dst = dst_uuid.toUnderType();
372
373 SipHash hash;
374 hash.update(seed);
375 hash.update(reinterpret_cast<const char *>(&src), sizeof(UUID));
376
377 /// Saving version and variant from an old UUID
378 hash.get128(reinterpret_cast<char *>(&dst));
379
380 dst.items[1] = (dst.items[1] & 0x1fffffffffffffffull) | (src.items[1] & 0xe000000000000000ull);
381 dst.items[0] = (dst.items[0] & 0xffffffffffff0fffull) | (src.items[0] & 0x000000000000f000ull);
382}
383
384class FixedStringModel : public IModel
385{

Callers 1

generateMethod · 0.85

Calls 2

get128Method · 0.80
updateMethod · 0.45

Tested by

no test coverage detected