TPMLIB_DecodeBlob(3)
π TPMLIB_DecodeBlob(3) β the libtpms glow-up
okay so bestie, welcome to TPMLIB_DecodeBlob, a page from the libtpms manual, and honestly? she's a little decoder with main character energy. let's get into it β¨
π NAME
TPMLIB_DecodeBlob β decode a base64-encoded TPM blob. that's it, that's the whole vibe π«Ά
πΈ SYNOPSIS
#include <libtpms/tpm_types.h>
#include <libtpms/tpm_library.h>
TPM_RESULT TPMLIB_DecodeBlob(const char *buffer,
enum TPMLIB_BlobType type,
unsigned char **result
size_t *result_len);
copy that exactly, bestie, no cap β i said what i said π
π¦ DESCRIPTION
so the TPMLIB_DecodeBlob() function is literally here to decode a base64-encoded TPM state blob. the caller has to pass in what type of blob is expected to be decoded, and after that the function goes hunting for the start and end markers of the data πβ¨
here's the types of blobs that are supported, plus their start and end markers β iconic list incoming:
π BLOB_TYPE_INITSTATE
'-----BEGIN INITSTATE-----'marks the beginning of the base64-encoded blob. π¬'-----END INITSTATE-----'marks the end of the base64-encoded blob. π
this function is highkey useful when you're passing state to the TPM inside the callback that gets invoked to grab the TPM's state blob. see TPMLIB_RegisterCallbacks(3). iykyk π
π₯ ERRORS
TPM_SUCCESSβ the function completed successfully. slay, we love a happy ending πTPM_SIZEβ the size of a requested buffer exceeds the limit, or the system is out of memory π (genuinely not the moment)TPM_FAILβ an error happened while attempting to decode the blob π it's giving "something went wrong"
for the complete list of TPM error codes, please consult the include file libtpms/tpm_error.h β she has the receipts π
π SEE ALSO
TPMLIB_MainInit(3), TPMLIB_RegisterCallbacks(3) β go read those too, bestie, they're part of the lore π§
reminder: those markers and flags are literal β copy them character for character. no improvising, no "fixing" the vibes into different text π
β okay that's the page!! brought to you by libtpms, dated 2026-01-02, and it's the TPMLIB_DecodeBlob(3) manual β drink some water, decode your blobs responsibly, and stan a well-documented library π
ππ
π¦ where this page comes from
- alpine 3.24: libtpms-doc 0.10.2-r0 Β· BSD-3-Clause
- arch rolling: libtpms 0.10.2-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms