From c0e5d9280dd156631bd398463dbb6a65aff37d19 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 15 Aug 2024 17:10:10 +0200 Subject: Implement SHA-1 --- c/sha1/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 c/sha1/Makefile (limited to 'c/sha1/Makefile') diff --git a/c/sha1/Makefile b/c/sha1/Makefile new file mode 100644 index 0000000..4012c1d --- /dev/null +++ b/c/sha1/Makefile @@ -0,0 +1,15 @@ +all: sha1-naïve sha1-x86 + +sha1-naïve: main.c sha1-naïve.c + cc -flto -O3 -o $@ main.c $@.c + +sha1-x86: main.c sha1-x86.c + cc -flto -O3 -msha -msse4.1 -o $@ main.c $@.c + +expected: + { yes 'a' | tr -d '\n' | head -c1000000; \ + yes 'b' | tr -d '\n' | head -c1000000; } \ + | sha1sum | cut -d' ' -f1 + +clean: + rm -f sha1-naïve sha1-x86 -- cgit v1.2.3