3
* Licensed Materials - Property of IBM
5
* trousers - An open source TCG Software Stack
7
* (C) Copyright International Business Machines Corp. 2004-2006
16
#include "trousers/tss.h"
17
#include "trousers/trousers.h"
18
#include "trousers_types.h"
19
#include "spi_utils.h"
20
#include "capabilities.h"
26
Tspi_Hash_SetHashValue(TSS_HHASH hHash, /* in */
27
UINT32 ulHashValueLength, /* in */
28
BYTE * rgbHashValue) /* in */
30
if (ulHashValueLength == 0 || rgbHashValue == NULL)
31
return TSPERR(TSS_E_BAD_PARAMETER);
33
return obj_hash_set_value(hHash, ulHashValueLength, rgbHashValue);
37
Tspi_Hash_GetHashValue(TSS_HHASH hHash, /* in */
38
UINT32 * pulHashValueLength, /* out */
39
BYTE ** prgbHashValue) /* out */
41
if (pulHashValueLength == NULL || prgbHashValue == NULL)
42
return TSPERR(TSS_E_BAD_PARAMETER);
44
return obj_hash_get_value(hHash, pulHashValueLength, prgbHashValue);
48
Tspi_Hash_UpdateHashValue(TSS_HHASH hHash, /* in */
49
UINT32 ulDataLength, /* in */
50
BYTE *rgbData) /* in */
52
if (rgbData == NULL && ulDataLength != 0)
53
return TSPERR(TSS_E_BAD_PARAMETER);
55
if (ulDataLength == 0)
58
return obj_hash_update_value(hHash, ulDataLength, rgbData);