Implementation 1 created

This commit is contained in:
finn 2022-07-15 11:30:19 +02:00
parent befa4de16f
commit df9f09d9df
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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;