1Tspi_Hash_Sign(3) Library Functions Manual Tspi_Hash_Sign(3)
2
3
4
5 TCG Software Stack Developer's Reference
6
8 Tspi_Hash_Sign - sign the hash data of an object with a signing key
9
11 #include <tss/platform.h>
12 #include <tss/tcpa_defines.h>
13 #include <tss/tcpa_typedef.h>
14 #include <tss/tcpa_struct.h>
15 #include <tss/tss_typedef.h>
16 #include <tss/tss_structs.h>
17 #include <tss/tspi.h>
18
19 TSS_RESULT Tspi_Hash_Sign(TSS_HHASH hHash, TSS_HKEY hKey,
20 UINT32 pulSignatureLength, BYTE** prgbSignature);
21
22
23
25 Tspi_Hash_Sign signs the hash data of an object with a given signing
26 key. The data must be set at the hash instance associated with hHash by
27 calling Tspi_Hash_SetHashValue or Tspi_Hash_UpdateHashValue. The
28 Tspi_Hash_Sign method allocates a memory block for the prgbSignature
29 data. This memory must be released using Tspi_Context_FreeMemory.
30
31
33 hHash
34 The handle to the hash object instance whose hash value should be
35 signed.
36
37 hKey
38 Handle to the key object which should be used for the signature.
39
40 pulSignatureLength
41 Receives the length of the signature data returned at the parameter
42 prgbSignature on successful completion.
43
44 prgbSignature
45 Receives a pointer to the signature data on successful completion.
46
47
49 Tspi_Hash_Sign returns TSS_SUCCESS on success, otherwise one of the
50 following values is returned:
51
52 TSS_E_INVALID_HANDLE
53 hKey is not a valid handle.
54
55
56 TSS_E_INTERNAL_ERROR
57 An internal SW error has been detected.
58
59
60 TSS_E_BAD_PARAMETER
61 One or more parameters is bad.
62
63
64 TSS_E_HASH_INVALID_LENGTH
65 Hash length is inconsistent with hash algorithm.
66
67
68 TSS_E_HASH_NO_DATA
69 Hash object has no internal hash value.
70
71
72 TSS_E_HASH_NO_IDENTIFIER
73 The hash algorithm identifier is not set.
74
75
76
78 Tspi_Hash_Sign conforms to the Trusted Computing Group Software Speci‐
79 fication version 1.1 Golden
80
81
83 Tspi_Hash_UpdateHashValue(3), Tspi_Hash_SetHashValue(3), Tspi_Hash_Ver‐
84 ifySignature(3).
85
86
87
88
89TSS 1.1 2004-05-25 Tspi_Hash_Sign(3)