<commit_before>.\" Copyright (C) 2005, 2006 International Business Machines Corporation
.\"
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "tpm_sealdata" 3 "2005-08-10"  "TPM Management"
.ce 1
TPM Management - tpmUnsealFile, tpmUnsealShred, tpmUnsealStrerror
.SH NAME
tpmUnsealFile, tpmUnsealShred, tpmUnsealStrerror - unseal routines
.SH "SYNOPSIS"
.ad l
.hy 0
.B #include <tpm_unseal/tpm_unseal.h>
.sp
.B int tpmUnsealFile(char* file, char** data, int* size);
.br
.B void tpmUnsealShred(char* data, int size);
.br
.B char* tpmUnsealStrerror(int rc);
.br

.SH "DESCRIPTION"
.PP
The functions in the tpmUnseal family allow access to a piece of sensitive data that has been sealed to the TPM configuration of a given system if the conditions are right, that is the SRK has not changed and does not require authorization, and the PCRS (if any) specified at seal time are of the appropriate value.

The tpmUnsealFile function returns the contents of the file unsealed in the data buffer.  The memory at *data must be freed by the caller.

The tpmUnsealShred function will zero and free the memory.

The tpmUnsealStrerror function will convert the return code from tpmUnsealFile into a human comprehensible string using and internal errno variable.

.SH "Return Value"
The tpmUnsealFile function returns 0 on success and a negative number on error.
The tpmUnsealStrerror function returns the error string on success and the empty string on an error.

.SH "SEE ALSO"
.PP
\fBtpm_sealdata\fR(1)
<commit_msg>removed wording about SRK not requiring auth<commit_after>.\" Copyright (C) 2005, 2006 International Business Machines Corporation
.\"
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "tpm_sealdata" 3 "2005-08-10"  "TPM Management"
.ce 1
TPM Management - tpmUnsealFile, tpmUnsealShred, tpmUnsealStrerror
.SH NAME
tpmUnsealFile, tpmUnsealShred, tpmUnsealStrerror - unseal routines
.SH "SYNOPSIS"
.ad l
.hy 0
.B #include <tpm_unseal/tpm_unseal.h>
.sp
.B int tpmUnsealFile(char* file, char** data, int* size);
.br
.B void tpmUnsealShred(char* data, int size);
.br
.B char* tpmUnsealStrerror(int rc);
.br

.SH "DESCRIPTION"
.PP
The functions in the tpmUnseal family allow access to a piece of sensitive data that has been sealed to the TPM configuration of a given system if the conditions are right, that is the SRK has not changed and the PCRS (if any) specified at seal time are of the appropriate value.

The tpmUnsealFile function returns the contents of the file unsealed in the data buffer.  The memory at *data must be freed by the caller.

The tpmUnsealShred function will zero and free the memory.

The tpmUnsealStrerror function will convert the return code from tpmUnsealFile into a human comprehensible string using and internal errno variable.

.SH "Return Value"
The tpmUnsealFile function returns 0 on success and a negative number on error.
The tpmUnsealStrerror function returns the error string on success and the empty string on an error.

.SH "SEE ALSO"
.PP
\fBtpm_sealdata\fR(1)

{'fraction_non_alphanumeric': 0.09014675052410902, 'fraction_numerical': 0.01737047020065888, 'mean_word_length': 3.7443181818181817, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3273981', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1176, 'n_words': 507}