pfk_kc.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  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. #ifndef PFK_KC_H_
  13. #define PFK_KC_H_
  14. #include <linux/types.h>
  15. int pfk_kc_init(void);
  16. int pfk_kc_deinit(void);
  17. int pfk_kc_load_key_start(const unsigned char *key, size_t key_size,
  18. const unsigned char *salt, size_t salt_size, u32 *key_index,
  19. bool async, unsigned int data_unit);
  20. void pfk_kc_load_key_end(const unsigned char *key, size_t key_size,
  21. const unsigned char *salt, size_t salt_size);
  22. int pfk_kc_remove_key_with_salt(const unsigned char *key, size_t key_size,
  23. const unsigned char *salt, size_t salt_size);
  24. int pfk_kc_remove_key(const unsigned char *key, size_t key_size);
  25. int pfk_kc_clear(void);
  26. void pfk_kc_clear_on_reset(void);
  27. const char *pfk_kc_get_storage_type(void);
  28. extern char *saved_command_line;
  29. #endif /* PFK_KC_H_ */