埃斯提爱慕
发布时间:2024-5-24 18:57
|
工程创建参考: https://shequ.stmicroelectronics ... p;extra=#pid2657071 
生成代码 定义几个字符串,数组等,模拟文件数据 /* 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 */ 编译运行,看效果 
反正加密后的我是看不懂,哈哈哈哈 |
实战经验 | STM32CubeIDE实用技巧之如何指定变量、函数、文件到指定内存
【STM32U3 评测】步进电机驱动
【STM32U3 评测】MNIST 数字识别
【STM32U3 评测】介绍、环境搭建、工程测试
STM32Cube嵌入式软件更新
一步到位!STM32CubeIDE 搭建 ClassB 功能安全工程
扩展器件适配、优化开发流程——STM32CubeIDE 2.1.0新版本发布
留言赢礼 | 全新升级的STM32CubeIDE for Visual Studio Code
直播回顾 | STM32CubeIDE for VS Code开发新体验
经验分享 | LAT1485 STM32CubeIDE实用技巧之条件断点的妙用
微信公众号
手机版