Neeraj Soni | c692cb9 | 2018-04-18 17:20:22 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef PFK_KC_H_ |
| 14 | #define PFK_KC_H_ |
| 15 | |
| 16 | #include <linux/types.h> |
| 17 | |
| 18 | int pfk_kc_init(void); |
| 19 | int pfk_kc_deinit(void); |
| 20 | int pfk_kc_load_key_start(const unsigned char *key, size_t key_size, |
| 21 | const unsigned char *salt, size_t salt_size, u32 *key_index, |
Neeraj Soni | e3af8d5 | 2018-09-05 14:32:49 +0530 | [diff] [blame] | 22 | bool async, unsigned int data_unit, int ice_rev); |
Neeraj Soni | c692cb9 | 2018-04-18 17:20:22 +0530 | [diff] [blame] | 23 | void pfk_kc_load_key_end(const unsigned char *key, size_t key_size, |
| 24 | const unsigned char *salt, size_t salt_size); |
| 25 | int pfk_kc_remove_key_with_salt(const unsigned char *key, size_t key_size, |
| 26 | const unsigned char *salt, size_t salt_size); |
| 27 | int pfk_kc_remove_key(const unsigned char *key, size_t key_size); |
| 28 | int pfk_kc_clear(void); |
| 29 | void pfk_kc_clear_on_reset(void); |
Neeraj Soni | efb3311 | 2018-08-17 20:39:35 +0530 | [diff] [blame] | 30 | const char *pfk_kc_get_storage_type(void); |
Neeraj Soni | c692cb9 | 2018-04-18 17:20:22 +0530 | [diff] [blame] | 31 | extern char *saved_command_line; |
| 32 | |
| 33 | |
| 34 | #endif /* PFK_KC_H_ */ |