mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-17 05:40:13 +01:00
Preparation to merge cryptsetup-reencrypt in cryptsetup.
This commit is contained in:
46
src/utils_luks.h
Normal file
46
src/utils_luks.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Helper utilities for LUKS in cryptsetup
|
||||
*
|
||||
* Copyright (C) 2018-2021 Red Hat, Inc. All rights reserved.
|
||||
* Copyright (C) 2018-2021 Milan Broz
|
||||
* Copyright (C) 2018-2021 Ondrej Kozina
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef UTILS_LUKS_H
|
||||
#define UTILS_LUKS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
const char *luksType(const char *type);
|
||||
|
||||
bool isLUKS1(const char *type);
|
||||
|
||||
bool isLUKS2(const char *type);
|
||||
|
||||
int verify_passphrase(int def);
|
||||
|
||||
void set_activation_flags(uint32_t *flags);
|
||||
|
||||
int set_pbkdf_params(struct crypt_device *cd, const char *dev_type);
|
||||
|
||||
int set_tries_tty(void);
|
||||
|
||||
int get_adjusted_key_size(const char *cipher_mode, uint32_t default_size_bits, int integrity_keysize);
|
||||
|
||||
int luksFormat(struct crypt_device **r_cd, char **r_password, size_t *r_passwordLen);
|
||||
|
||||
#endif /* UTILS_LUKS_H */
|
||||
Reference in New Issue
Block a user