//===- llvm/unittest/Support/SipHashTest.cpp ------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "llvm/Support/SipHash.h" #include "llvm/ADT/ArrayRef.h" #include "gtest/gtest.h" #include <string.h> usingnamespacellvm; namespace { // Tests from the SipHash reference implementation: // https://github.com/veorq/SipHash // from test.c and vectors.h, with the latter vectors at the end of the file, // forward-declared here. extern const uint8_t ExpectedSipHash64[64][8]; extern const uint8_t ExpectedSipHash128[64][16]; TEST(SipHashTest, SipHash_2_4_64) { … } TEST(SipHashTest, SipHash_2_4_128) { … } // Tests for the ptrauth-specific SipHash wrapper. TEST(SipHashTest, PointerAuthSipHash) { … } // Below are the unmodified expected outputs from the reference vectors.h. const uint8_t ExpectedSipHash64[64][8] = …; const uint8_t ExpectedSipHash128[64][16] = …; } // end anonymous namespace