你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

【NUCLEO-U083RC评测】AES加密解密

[复制链接]
埃斯提爱慕 发布时间:2024-5-24 18:57
工程创建参考:
https://shequ.stmicroelectronics ... p;extra=#pid2657071



![alt text](image.png)
image.png

生成代码

定义几个字符串,数组等,模拟文件数据

    /* USER CODE BEGIN PV */
    char *SourceFile = "STMicroelectronics Community";
    char EncryptFile[128] = {0};
    char DecryptFile[128] = {0};
    /* USER CODE END PV */

main.c中添加程序

    /* USER CODE BEGIN BSP */

    /* -- Sample board code to send message over COM1 port ---- */
    printf("Welcome to STM32 world !\n\r");

    /* -- Sample board code to switch on leds ---- */
    BSP_LED_On(LED_GREEN);

    printf("The source file is: %s !\n\r", SourceFile);
    HAL_CRYP_Encrypt(&hcryp, SourceFile, strlen(SourceFile), EncryptFile, 1000);
    printf("The encrypted file is: %s !\n\r", EncryptFile);

    HAL_CRYP_Decrypt(&hcryp, EncryptFile, strlen(SourceFile), DecryptFile, 1000);
    printf("The Decrypted file is: %s !\n\r", DecryptFile);
    /* USER CODE END BSP */

编译运行,看效果
![alt text](image-1.png)
image-1.png


反正加密后的我是看不懂,哈哈哈哈


收藏 评论0 发布时间:2024-5-24 18:57

举报

0个回答

所属标签

相似分享

官网相关资源

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版