diff --git a/Implementierung/Makefile b/Implementierung/Makefile index 843d95b..228eb39 100644 --- a/Implementierung/Makefile +++ b/Implementierung/Makefile @@ -1,6 +1,6 @@ -SRC = src/main.c src/helper.c src/io.c src/md2.c src/md2_impls/md2_common.c src/md2_impls/md2_0.c src/md2_impls/md2_2.c +SRC = src/main.c src/helper.c src/io.c src/md2.c src/md2_impls/md2_common.c src/md2_impls/md2_0.c src/md2_impls/md2_2.c src/md2_impls/md2_1.c OBJ = ${subst src,build,${SRC:.c=.o}} CC = gcc CFLAGS = -Ilib -ggdb -std=c11 -g -Wall -Wextra -no-pie -O3 diff --git a/Implementierung/src/md2.c b/Implementierung/src/md2.c index da49453..de9b908 100644 --- a/Implementierung/src/md2.c +++ b/Implementierung/src/md2.c @@ -2,6 +2,7 @@ // include all implementations #include "../lib/md2_impls/md2_0.h" +#include "../lib/md2_impls/md2_1.h" #include "../lib/md2_impls/md2_2.h" md2_hash_func md2_hash; @@ -23,6 +24,11 @@ bool md2_choose_implementation(int i) { md2_checksum = md2_checksum_0; return true; + case 1: + md2_hash = md2_hash_1; + md2_checksum = md2_checksum_1; + return true; + case 2: md2_hash = md2_hash_2; md2_checksum = md2_checksum_2;