#ifndef CP2_SECU_PBKDF1_H_ #define CP2_SECU_PBKDF1_H_ /* Cesar project {{{ * * Copyright (C) 2008 Spidcom * * <<>> * * }}} */ /** * \file cp/secu/pbkdf1.h * \brief Fonction PBKDF1. * \ingroup cp_secu */ enum cp_secu_salt_kind_t { CP_SECU_SALT_KEY_DAK, CP_SECU_SALT_KEY_NMK_HS, CP_SECU_SALT_SPIDCOM, CP_SECU_SALT_NONE, CP_SECU_SALT_KEY_NB }; typedef enum cp_secu_salt_kind_t cp_secu_salt_kind_t; /** * PBKDF1 generation function. * \param ctx the module context. * \param input the input buffer. * \param input_length the length of the input buffer. * \param output the output buffer. * \param output_length the length of the output buffer (in bytes). At most * 20 bytes. * \param output_length the output buffer length * \param salt the salt index to use. */ void cp_secu_pbkdf1 (cp_t *ctx, const u8 input[], const uint input_length, u8 *output, uint output_length, cp_secu_salt_kind_t salt, uint iteration); #endif /* CP2_SECU_PBKDF1_H_ */