|
| 1 | +/////////////////////////////////////////////////////////////////////////////// |
| 2 | +// // |
| 3 | +// DxilHash.h // |
| 4 | +// Copyright (C) Microsoft Corporation. All rights reserved. // |
| 5 | +// This file is distributed under the University of Illinois Open Source // |
| 6 | +// License. See LICENSE.TXT for details. // |
| 7 | +// // |
| 8 | +// // |
| 9 | +// DXBC/DXIL container hashing functions // |
| 10 | +// // |
| 11 | +/////////////////////////////////////////////////////////////////////////////// |
| 12 | + |
| 13 | +#pragma once |
| 14 | + |
| 15 | +#define DXIL_CONTAINER_HASH_SIZE 16 |
| 16 | + |
| 17 | +// Prototype for hash computing function |
| 18 | +// pOutHash must always return a DXIL_CONTAINER_HASH_SIZE byte hash result. |
| 19 | +typedef void HASH_FUNCTION_PROTO(const BYTE *pData, UINT32 byteCount, |
| 20 | + BYTE *pOutHash); |
| 21 | + |
| 22 | +// ************************************************************************************** |
| 23 | +// **** DO NOT USE THESE ROUTINES TO PROVIDE FUNCTIONALITY THAT NEEDS TO BE |
| 24 | +// SECURE!!! *** |
| 25 | +// ************************************************************************************** |
| 26 | +// Derived from: RSA Data Security, Inc. M |
| 27 | +// D |
| 28 | +// 5 Message-Digest Algorithm |
| 29 | +// Computes a 128-bit hash of pData (size byteCount), returning 16 BYTE output |
| 30 | +void ComputeHashRetail(const BYTE *pData, UINT32 byteCount, BYTE *pOutHash); |
| 31 | +void ComputeHashDebug(const BYTE *pData, UINT32 byteCount, BYTE *pOutHash); |
| 32 | +// ************************************************************************************** |
| 33 | +// **** DO NOT USE THESE ROUTINES TO PROVIDE FUNCTIONALITY THAT NEEDS TO BE |
| 34 | +// SECURE!!! *** |
| 35 | +// ************************************************************************************** |
0 commit comments