编译、烧录到mcu后,串口输出:
[2022-01-01 22:05:10.192]# RECV ASCII>
----------------------
Algorithm demo start.
Pseudo random with seed 1,2: 0x00000025, 0x9f1babda, 0x60e45055, 0x40510500, 0x1504bee4, 0x5a592cfb, 0x91a3f670, 0x0c2386be,
Pseudo random with seed 3,4: 0x0000004b, 0x3e375425, 0x9f1ba788, 0x3d045055, 0x40502452, 0x12260342, 0x54225454, 0x50004504,
True random: 0xda67cef6, 0xac408f51, 0xd5c6ed59, 0xa4720174, 0x90c4283e, 0xc4f54a3c, 0xaf52ee5f, 0x3c7f7a24,
SHA1 of message `Hello!` is: 69342c5c39e5ae5f0077aecc32c0f81811fb8193
SHA224 of message `Hello!` is
[2022-01-01 22:05:10.292]# RECV ASCII>
: e250e4339955f02294ceb623860ae5f9374b93f4335bd605ada5113a
SHA256 of message `Hello!` is: 334d016f755cd6dc58c53a86e183882f8ec14f52fb05345887c8a5edd42c87b7
DES ECB encrypt:
key = 0102030405060708
plain = 1122334455667788
cipher = 6c5e94dcadd39f1d
decrypt out = 1122334455667788
AES ECB encrypt:
key = 0102030405060708090a0b0c0d0e0f10
plain = 112233445566778899aabbccddeeff00
cipher = 79f2bfbd6cfc0d30740c5d3bfa4cb850
decrypt out = 112233445566778899aabbccddeeff00
|