Debian Codegraph @

src/cryptsetup/cryptsetup-tokens/cryptsetup-token.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "shared-forward.h"
5
6 /* for more information see libcryptsetup.h crypt-tokens section */
7
8 const char* cryptsetup_token_version(void);
9
10 int cryptsetup_token_open(struct crypt_device *cd, int token,
11 char **password, size_t *password_len, void *usrptr);
12
13 int cryptsetup_token_open_pin(struct crypt_device *cd, int token,
14 const char *pin, size_t pin_size,
15 char **password, size_t *password_len, void *usrptr);
16
17 void cryptsetup_token_dump(struct crypt_device *cd, const char *json);
18
19 int cryptsetup_token_validate(struct crypt_device *cd, const char *json);
20
21 void cryptsetup_token_buffer_free(void *buffer, size_t buffer_len);