ql_api_aes.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*================================================================
  2. Copyright (c) 2021, Quectel Wireless Solutions Co., Ltd. All rights reserved.
  3. Quectel Wireless Solutions Proprietary and Confidential.
  4. =================================================================*/
  5. #ifndef QL_API_AES_H
  6. #define QL_API_AES_H
  7. /*****************************************************************
  8. * Function: ql_aes_string_encryption
  9. *
  10. * Description:
  11. * AES encryption algorithm
  12. * This function is to hash and encrypt the user input data to get an encrypted result.
  13. *
  14. * Parameters:
  15. * key [in] secret key
  16. * key_length [in] secret key length
  17. * inputdata [in] use inut data
  18. * outputdata [in] hash result
  19. * Return:
  20. * void
  21. *
  22. *****************************************************************/
  23. void ql_aes_string_encryption(unsigned char key[16], int key_length, unsigned char inputdata[16], unsigned char outputdata[16]);
  24. /*****************************************************************
  25. * Function: ql_aes_string_decryption
  26. *
  27. * Description:
  28. * AES decryption algorithm
  29. * This function decrypts the hash encrypted data to get the original data.
  30. *
  31. * Parameters:
  32. * key [in] secret key
  33. * key_length [in] secret key length
  34. * inputdata [in] use inut data
  35. * outputdata [in] hash result
  36. * Return:
  37. * void
  38. *
  39. *****************************************************************/
  40. void ql_aes_string_decryption(unsigned char key[16], int key_length, unsigned char inputdata[16], unsigned char outputdata[16]);
  41. #endif