Tspi_Hash_GetHashValue(3)

✨ Tspi_Hash_GetHashValue ✨

okay bestie, welcome to the Tspi_Hash_GetHashValue(3) page πŸ’– it lives in the Library Functions Manual and it's part of the TCG Software Stack Developer's Reference, which is giving very "trusted computing, but make it fashion" πŸŽ€


🌸 NAME 🌸

Tspi_Hash_GetHashValue β€” get the current hash value of a hash object πŸ¦‹


✨ 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_GetHashValue(TSS_HHASH hHash, UINT32* pulHashValueLength, BYTE** prgbHashValue);

πŸ’… DESCRIPTION πŸ’…

so Tspi_Hash_GetHashValue gets the hash value of a hash object. that's the whole vibe. it just. hands you the hash. iconic behavior honestly πŸ‘‘

but listen β€” memory gets allocated for the prgbHashValue data, so you must use Tspi_Context_FreeMemory to clean up after this function. no cap, no skipping the cleanup, we do not leave allocated memory lying around like laundry on the chair 🧺😭


🫢 PARAMETERS 🫢

hHash

the handle to the hash object instance whose hash value should be signed. yes bestie it says signed, that's what it says, we don't question the source material πŸ’œ

pulHashValueLength

receives the length of the hash value data returned at the parameter prgbHashValue. it's the lil measuring tape πŸ“βœ¨

prgbHashValue

receives a pointer to the hash value data. that's your actual hash, right there πŸ“


πŸ”₯ RETURN CODES πŸ”₯

Tspi_Hash_GetHashValue returns TSS_SUCCESS on success. otherwise one of the following values is returned:

  • TSS_E_INVALID_HANDLE β€” hHash is not a valid handle. not a valid handle, not invited to the party πŸ’€
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. something inside is going through it 😭
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad. bad parameter behavior, we don't stan πŸ™ˆ
  • TSS_E_HASH_INVALID_LENGTH β€” hash length is inconsistent with hash algorithm. the length and the algorithm are not matching each other's energy, it's giving mismatch 🌈
  • TSS_E_HASH_NO_DATA β€” hash object has no internal hash value. nothing in there. empty. void. a vibe check that failed πŸ•³οΈ

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_Hash_GetHashValue conforms to the Trusted Computing Group Software Specification version 1.1 Golden ⭐ β€” yes, Golden, capital G, we respect the spec in this house πŸ’–


🌈 SEE ALSO 🌈


ok that's the whole page bestie, go free your hash values responsibly 🫢✨

mwah πŸ’‹ this was TSS 1.1, dated 2004-05-25 β€” she's vintage, she's a classic, she's still serving. periodt.