Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions include/dxc/DxilHash/DxilHash.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
///////////////////////////////////////////////////////////////////////////////
// //
// DxilHash.h //
// Copyright (C) Microsoft Corporation. All rights reserved. //
// This file is distributed under the University of Illinois Open Source //
// License. See LICENSE.TXT for details. //
// //
// //
// DXBC/DXIL container hashing functions //
// //
///////////////////////////////////////////////////////////////////////////////

#pragma once

#define DXIL_CONTAINER_HASH_SIZE 16

// Prototype for hash computing function
// pOutHash must always return a DXIL_CONTAINER_HASH_SIZE byte hash result.
typedef void HASH_FUNCTION_PROTO(const BYTE *pData, UINT32 byteCount,
BYTE *pOutHash);

// **************************************************************************************
// **** DO NOT USE THESE ROUTINES TO PROVIDE FUNCTIONALITY THAT NEEDS TO BE
// SECURE!!! ***
// **************************************************************************************
// Derived from: RSA Data Security, Inc. M
// D
// 5 Message-Digest Algorithm
// Computes a 128-bit hash of pData (size byteCount), returning 16 BYTE output
void ComputeHashRetail(const BYTE *pData, UINT32 byteCount, BYTE *pOutHash);
void ComputeHashDebug(const BYTE *pData, UINT32 byteCount, BYTE *pOutHash);
// **************************************************************************************
// **** DO NOT USE THESE ROUTINES TO PROVIDE FUNCTIONALITY THAT NEEDS TO BE
// SECURE!!! ***
// **************************************************************************************
1 change: 1 addition & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ add_subdirectory(DxcSupport) # HLSL Change
add_subdirectory(HLSL) # HLSL Change
add_subdirectory(DXIL) # HLSL Change
add_subdirectory(DxilContainer) # HLSL Change
add_subdirectory(DxilHash) # HLSL Change
add_subdirectory(DxilPdbInfo) # HLSL Change
add_subdirectory(DxilPIXPasses) # HLSL Change
add_subdirectory(DxilDia) # HLSL Change
Expand Down
3 changes: 3 additions & 0 deletions lib/DxilHash/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

add_llvm_library(LLVMDxilHash
DxilHash.cpp)
Loading
Loading