Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint8_t in[] = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a };
- struct AES_ctx ctx;
- AES_init_ctx(&ctx, key);
- AES_ECB_encrypt(&ctx, in);
- printf("ECB encrypt: ");
- if (0 == memcmp((char*) out, (char*) in, 16))
- {
- printf("SUCCESS!n");
- }
- else
- {
- printf("FAILURE!n");
- }
Add Comment
Please, Sign In to add comment