摘要: openssl命令: 生成hmac: 验证: C语言代码实现: 代码如下: ` #include #include #include #include int main() { // 这个例子中,我们将随机生成一个密钥 unsigned char key[EVP_MAX_MD_SIZE]; int 阅读全文
posted @ 2024-04-29 09:36 天问—九章 阅读(4) 评论(0) 推荐(0) 编辑
摘要: SM4代码如下: ``#include <openssl/evp.h> include <stdio.h> include <string.h> int main() { EVP_CIPHER_CTX *ctx; int len; int ciphertext_len; unsigned char 阅读全文
posted @ 2024-04-29 09:15 天问—九章 阅读(3) 评论(0) 推荐(0) 编辑