tpm2tss-tpm2data_write(3)
π 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. π«Ά
π COPYRIGHT π
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 πΈβ¨π
π¦ where this page comes from
- alpine 3.24: tpm2-tss-engine-doc 1.2.0-r3 Β· BSD-2-Clause
- fedora 43: tpm2-tss-engine-devel 1.2.0-8.fc43 Β· BSD-3-Clause
- fedora 43: tpm2-tss-engine-devel 1.2.0-8.fc43 Β· BSD-3-Clause
- fedora 44: tpm2-tss-engine-devel 1.2.0-9.fc44 Β· BSD-3-Clause
- fedora 44: tpm2-tss-engine-devel 1.2.0-9.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: tpm2-tss-engine 1.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tpm2-tss-engine 1.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tpm2-tss-engine 1.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tpm2-tss-engine 1.2.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms