Tspi_Hash_SetHashValue(3)
π Tspi_Hash_SetHashValue(3) π
okay bestie, so this is a page from the TCG Software Stack Developer's Reference β it lives in the Library Functions Manual section, and it's about giving your hash object an actual hash value. non-SHA1 girlies, this one's for you π«Ά
β¨ NAME β¨
Tspi_Hash_SetHashValue β sets the hash value of a hash object for non-SHA1 hash objects. yes, it's giving "put the value in the thing". iconic behaviour honestly π
πΈ SYNOPSIS πΈ
#include <tss/platform.h>
#include <tss/tcpa_defines.h>
#include <tss/tcpa_typedef.h>
#include <tss/tcpa_struct.h>
#include <tss/tss_typedef.h>
#include <tss/tss_structs.h>
#include <tss/tspi.h>
TSS_RESULT Tspi_Hash_SetHashValue(TSS_HHASH hHash, UINT32 ulHashValueLength, BYTE* rgbHashValue);
like, yes, all seven includes. the whole skincare routine. don't skip a step π§
π DESCRIPTION π
So Tspi_Hash_SetHashValue sets the hash value of a hash object. That's the whole job. She's a one-task queen and she ate π₯
But here's the tea, and it matters: if the object was created with the flag TSS_HASH_OTHER, then the hash identifier has to be set by calling Tspi_SetAttribData to perform the sign operation. so if you're on the TSS_HASH_OTHER path and you skip that step, the sign operation justβ¦ won't. no cap. set the identifier first, bestie π
π PARAMETERS π
hHash
The handle to the hash object instance whose hash value should be signed. like, the little guy you're working on β¨
ulHashValueLength
Indicates the length of the hash value data provided at the parameter rgbHashValue. yes, you gotta tell her how long the data is. she's not a mind reader π
rgbHashValue
A pointer to the hash value data. that's it. that's the data. point at it π
π RETURN CODES π
Tspi_Hash_SetHashValue returns TSS_SUCCESS on success β slay β otherwise one of the following values is returned:
TSS_E_INVALID_HANDLEβhHashis not a valid handle. she does not know her. πTSS_E_INTERNAL_ERRORβ An internal SW error has been detected. not your fault, lowkey, but still a problem πTSS_E_BAD_PARAMETERβ One or more parameters is bad. one of y'all is misbehaving and she's calling it out πTSS_E_HASH_INVALID_LENGTHβ Hash length is inconsistent with hash algorithm. the length doesn't match the algorithm, and that's a vibe check fail.TSS_E_HASH_NO_DATAβ Hash object has no internal hash value. she's empty. nothing in there. girl where's the data π
π CONFORMING TO π
Tspi_Hash_SetHashValue conforms to the Trusted Computing Group Software Specification version 1.1 Golden. Golden!! like, literally the gold standard, main character energy β
π¦ SEE ALSO π¦
go read the rest of the friend group, they all hang out together π«Ά
πΈ and that's the page!! TSS 1.1 energy, dated 2004-05-25 β an absolute vintage icon, and she's still serving. mwah ππβ¨
π¦ where this page comes from
- debian bookworm: libtspi-dev 0.3.15-0.3 Β· BSD-3-Clause
- debian trixie: libtspi-dev 0.3.15-0.4 Β· BSD-3-Clause
- epel 10: trousers-devel 0.3.15-11.el10_0 Β· BSD
- epel 9: trousers-devel 0.3.15-5.el9 Β· BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: trousers 0.3.15
- nixpkgs unstable: netbsd-source 11.0
- nixpkgs unstable: trousers 0.3.15
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libtspi-dev 0.3.15-0.2 Β· BSD-3-Clause
- ubuntu noble: libtspi-dev 0.3.15-0.3build2 Β· BSD-3-Clause
- ubuntu questing: libtspi-dev 0.3.15-0.4
- ubuntu resolute: libtspi-dev 0.3.15-1 Β· BSD-3-Clause
- ubuntu stonking: libtspi-dev 0.3.15-1ubuntu2 Β· BSD-3-Clause
- Copyright (C) 2004 International Business Machines Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms