utils_hmac.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Tencent is pleased to support the open source community by making IoT Hub
  3. available.
  4. * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
  5. * Licensed under the MIT License (the "License"); you may not use this file
  6. except in
  7. * compliance with the License. You may obtain a copy of the License at
  8. * http://opensource.org/licenses/MIT
  9. * Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is
  11. * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  12. KIND,
  13. * either express or implied. See the License for the specific language
  14. governing permissions and
  15. * limitations under the License.
  16. *
  17. */
  18. #ifndef QCLOUD_IOT_UTILS_HMAC_H_
  19. #define QCLOUD_IOT_UTILS_HMAC_H_
  20. #include <string.h>
  21. void utils_hmac_md5(const char *msg, int msg_len, char *digest, const char *key, int key_len);
  22. void utils_hmac_sha1(const char *msg, int msg_len, char *digest, const char *key, int key_len);
  23. int utils_hmac_sha1_hex(const char *msg, int msg_len, char *digest, const char *key, int key_len);
  24. #endif