15#include "siphash/SipHash.h"
24using namespace support;
26#define DEBUG_TYPE "llvm-siphash"
30 siphash<2, 4>(In.data(), In.size(), K, Out);
35 siphash<2, 4>(In.data(), In.size(), K, Out);
40 static const uint8_t K[16] = {0xb5, 0xd4, 0xc9, 0xeb, 0x79, 0x10, 0x4a, 0x79,
41 0x6f, 0xec, 0x8b, 0x1b, 0x42, 0x87, 0x81, 0xd4};
48 uint16_t Discriminator = (RawHash % 0xFFFF) + 1;
50 dbgs() <<
"ptrauth stable hash discriminator: " << utostr(Discriminator)
52 << utohexstr(Discriminator,
false, 4)
54 <<
" of: " << Str <<
"\n");
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
uint64_t read64le(const void *P)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void getSipHash_2_4_64(ArrayRef< uint8_t > In, const uint8_t(&K)[16], uint8_t(&Out)[8])
Computes a SipHash-2-4 64-bit result.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
LLVM_ABI uint16_t getPointerAuthStableSipHash(StringRef S)
Compute a stable non-zero 16-bit hash of the given string.
LLVM_ABI void getSipHash_2_4_128(ArrayRef< uint8_t > In, const uint8_t(&K)[16], uint8_t(&Out)[16])
Computes a SipHash-2-4 128-bit result.