tpm2tss-tpm2data_write(3)

πŸ“¦
version 1.2.0 Β· 4 versions
, in alpine 3.24, fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– tpm2tss-tpm2data_write(3) πŸ’–

okay bestie, welcome to the Library calls section of the manual, and today's main character is tpm2tss-tpm2data_write(3) β€” yes, that's the page you're on, no cap. ✨


🌸 NAME 🌸

tpm2tss_tpm2data_write, tpm2tss_tpm2data_read – read/write TPM2_DATA

like. it reads. it writes. it's giving duality. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <tpm2tss.h>

**int tpm2tss_tpm2data_read(const char *filename, TPM2_DATA tpm2Datap);

int tpm2tss_tpm2data_write(const TPM2_DATA tpm2Data, const char filename);
bestie the ** in that first line is literally how the manpage prints it, so I'm keeping it exactly as-is. do not come for me. πŸ™ˆ

✨ DESCRIPTION ✨

πŸ“ tpm2tss_tpm2data_read

so tpm2tss_tpm2data_read reads the TPM2_DATA object out of a file called filename, allocates memory, and stores it under the parameter tpm2Datap.

and here's the part you CANNOT skip, iykyk: that memory must be freed using the free() function. bestie. free your memory. it's not a vibe to leak. πŸ’€

🧚 tpm2tss_tpm2data_write

meanwhile tpm2tss_tpm2data_write takes the TPM2_DATA object from the parameter tpm2Data and writes it to a newly created file called filename.

newly created. like it's making a whole new file, iconic behavior honestly. πŸ‘‘


⭐ RETURN VALUE ⭐

upon successful completion, tpm2tss_tpm2data_write() and tpm2tss_tpm2data_read() return 1.

otherwise 0.

that's it. that's the whole vibe check. 1 = slay, 0 = not slay. πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

Written by Andreas Fuchs. 🫢


tpm2tss is Copyright (C) 2018 Fraunhofer SIT sponsored by Infineon Technologies AG. License BSD 3-clause.


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the page fr fr πŸ’– this whole thing came to you from tpm2-tss-engine, dated JUNE 2018, and yeah β€” it lives at tpm2tss-tpm2data_write(3). go read/write some TPM2_DATA and stay hydrated bestie πŸŒΈβœ¨πŸŽ€