TSPI_HASH_UPDATEHASHVALUE(3)

✨ Tspi_Hash_UpdateHashValue ✨

okay bestie, welcome to the TCG Software Stack Developer's Reference πŸ’– this one's a page from the Library Functions Manual, and it's all about feeding fresh data into a hash object. pull up a chair, we're getting into it 🫢


🌸 NAME 🌸

Tspi_Hash_UpdateHashValue β€” update the 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_UpdateHashValue(TSS_HHASH hHash, UINT32 ulDataLength, BYTE* rgbData);

like yes, that's seven whole includes, she's thorough πŸ’…


πŸ’– DESCRIPTION πŸ’–

so Tspi_Hash_UpdateHashValue does exactly what it says on the tin: it updates the hash value of a hash object with new information. feeding the girlie some fresh data, love that for her ✨

BUT. big but. if the object was created with the flag TSS_HASH_OTHER, this method will return an error. so sorry bestie, that door is closed πŸ™ˆ

also, and this is the important part β€” the object can't be modified after any of these have been called on it:

  • Tspi_Hash_SetHashValue
  • Tspi_Hash_GetHashValue
  • Tspi_Hash_Sign
  • Tspi_Hash_VerifySignature

once one of those has touched it, she's locked in. no takebacks, no edits, periodt πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

🌈 hHash

The handle to the hash object instance whose hash value should be signed.

🌈 ulDataLength

Indicates the length of the data provided at the parameter rgbData.

🌈 rgbData

A pointer to the data.


⭐ RETURN CODES ⭐

Tspi_Hash_UpdateHashValue returns TSS_SUCCESS on success β€” slay πŸ’… β€” otherwise one of the following values is returned:

  • TSS_E_INVALID_HANDLE β€” hHash is not a valid handle. bestie that's not a real one 😭
  • TSS_E_INTERNAL_ERROR β€” An internal SW error has been detected. not our fault, the internals are going through it πŸ’€
  • TSS_E_BAD_PARAMETER β€” One or more parameters is bad. she's just not that girl πŸ™ˆ
  • TSS_E_HASH_INVALID_LENGTH β€” Hash length is inconsistent with hash algorithm.
  • TSS_E_HASH_NO_DATA β€” Hash object has no internal hash value. empty. void. nothing there πŸ«₯

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_Hash_UpdateHashValue conforms to the Trusted Computing Group Software Specification version 1.1 Golden ✨ certified icon behaviour, no cap.


🧚 SEE ALSO 🧚

Tspi_Hash_GetHashValue(3), Tspi_Hash_Sign(3), Tspi_Hash_SetHashValue(3), Tspi_Hash_VerifySignature(3).

the whole friend group fr fr, go say hi πŸ’œ


okay that's the whole page bestie!! this was TSS 1.1, dated 2004-05-25, and yes she's an elder but she still eats πŸ”₯ mwah, go hash something responsibly πŸ’–βœ¨