/**
 * @file COUNT_DES.h
 * @author 深圳市维晟智能技术有限公司
 * @brief
 * @version 1.0
 * @date 2023-12-01
 *
 * @copyright 深圳市维晟智能技术有限公司所有，侵权必究
 *
 */

#ifndef __COUNT_DES_H_
#define __COUNT_DES_H_
#include "app_trace.h "
#include <stdint.h>
#include <stdlib.h>

#define uint8_t unsigned char

uint8_t des_ecb_encrypt(uint8_t *pout, uint8_t *pdata1, uint8_t nlen, uint8_t *pkey);
void des_ecb_decrypt(uint8_t *pout, uint8_t *pdata1, uint8_t nlen, uint8_t *pkey);

uint8_t des_cbc_encrypt(uint8_t *pout, uint8_t *pdata1, uint8_t nlen, uint8_t *pkey, uint8_t *piv);
void des_cbc_decrypt(uint8_t *pout, uint8_t *pdata1, uint8_t nlen, uint8_t *pkey, uint8_t *piv);

uint8_t des3_ecb_encrypt(uint8_t *pout, uint8_t *pdata1, uint8_t nlen, uint8_t *pkey, uint8_t klen);
void des3_ecb_decrypt(uint8_t *pout, uint8_t *pdata1, uint8_t nlen, uint8_t *pkey, uint8_t klen);

uint8_t des3_cbc_encrypt(uint8_t *pout, uint8_t *pdata1, uint8_t nlen, uint8_t *pkey, uint8_t klen, uint8_t *piv);
void des3_cbc_decrypt(uint8_t *pout, uint8_t *pdata1, uint8_t nlen, uint8_t *pkey, uint8_t klen, uint8_t *piv);


#endif


