Write Aes Ecb Algorithm C Code Via Openssl Q37107587

how do you write an AES ECB algorithm in C code via openssl?


Solution


#include <openssl/evp.h>#include <openssl/aes.h>#include <openssl/err.h>#include <string.h> int main(int arc, char *argv[]){ OpenSSL_add_all_algorithms(); ERR_load_crypto_strings(); /* A 256 bit key */ static const unsigned char key[] = “01234567890123456789012345678901”; /* A 128 bit IV */ static const unsigned char iv[] = “0123456789012345”; /* Message to be encrypted */ unsigned char plaintext[] = “The quick brown fox jumps over the

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.