summaryrefslogtreecommitdiffstats
path: root/src/cryptsetup/cryptsetup-tokens/luks2-tpm2.h
blob: d36623baf960355295a1b868f34bf1cd8dd606c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* SPDX-License-Identifier: LGPL-2.1-or-later */

#pragma once

struct crypt_device;

int acquire_luks2_key(
                uint32_t pcr_mask,
                const char *device,
                const void *key_data,
                size_t key_data_size,
                const void *policy_hash,
                size_t policy_hash_size,
                void **ret_decrypted_key,
                size_t *ret_decrypted_key_size);

int parse_luks2_tpm2_data(
                const char *json,
                uint32_t search_pcr_mask,
                uint32_t *ret_pcr_mask,
                char **ret_base64_blob,
                char **ret_hex_policy_hash);