Implementation 1 created
This commit is contained in:
parent
befa4de16f
commit
df9f09d9df
2 changed files with 7 additions and 1 deletions
|
@ -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}}
|
OBJ = ${subst src,build,${SRC:.c=.o}}
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -Ilib -ggdb -std=c11 -g -Wall -Wextra -no-pie -O3
|
CFLAGS = -Ilib -ggdb -std=c11 -g -Wall -Wextra -no-pie -O3
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
// include all implementations
|
// include all implementations
|
||||||
#include "../lib/md2_impls/md2_0.h"
|
#include "../lib/md2_impls/md2_0.h"
|
||||||
|
#include "../lib/md2_impls/md2_1.h"
|
||||||
#include "../lib/md2_impls/md2_2.h"
|
#include "../lib/md2_impls/md2_2.h"
|
||||||
|
|
||||||
md2_hash_func md2_hash;
|
md2_hash_func md2_hash;
|
||||||
|
@ -23,6 +24,11 @@ bool md2_choose_implementation(int i) {
|
||||||
md2_checksum = md2_checksum_0;
|
md2_checksum = md2_checksum_0;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
md2_hash = md2_hash_1;
|
||||||
|
md2_checksum = md2_checksum_1;
|
||||||
|
return true;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
md2_hash = md2_hash_2;
|
md2_hash = md2_hash_2;
|
||||||
md2_checksum = md2_checksum_2;
|
md2_checksum = md2_checksum_2;
|
||||||
|
|
Loading…
Reference in a new issue