diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-08-15 17:10:10 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-15 17:10:10 +0200 |
commit | c0e5d9280dd156631bd398463dbb6a65aff37d19 (patch) | |
tree | 6883a55241a95fa9a2314b8d6189d2aa492e888f /c/sha1/Makefile | |
parent | a97a4077ddc33f2abd53a37540158d4448adf915 (diff) |
Implement SHA-1
Diffstat (limited to 'c/sha1/Makefile')
-rw-r--r-- | c/sha1/Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
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 |