--- /dev/null
+CXX=g++
+C=gcc
+CFLAGS=-O3 -std=c++11
+OBJ = pixmap_io.o one_round_new.o
+
+%.o: %.c
+ $(C) -c -o $@ $< $(CFLAGS)
+
+%.o: %.cpp
+ $(CXX) -c -o $@ $< $(CFLAGS)
+
+one_round_new: $(OBJ)
+ $(CXX) -o $@ $^ $(CFLAGS)
+
+clean:
+ rm -rf $(OBJ) one_round_new
--- /dev/null
+C=gcc
+CFLAGS= -I /usr/include/openssl/ -lcrypto -O3 -std=c99
+OBJ = pixmap_io.o openssl_evp.o
+
+
+openssl_evp: $(OBJ)
+ $(C) -o $@ $^ $(CFLAGS)
+
+
+%.o: %.c
+ $(C) -c -o $@ $<
+
+
+clean:
+ rm -rf $(OBJ) openssl_evp
//256
//avant ecb
- if(ctr)
+ if(ctr) {
if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_128_ctr(), NULL, key, iv))
handleErrors();
- else
+ }
+ else
if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv))
handleErrors();
//256
//avant => ecb
- if(ctr)
+ if(ctr) {
if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_128_ctr(), NULL, key, iv))
handleErrors();
- else
+ }
+ else
if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv))
handleErrors();