aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-07-16 21:24:45 -0400
committerPaul Duncan <pabs@pablotron.org>2019-07-16 21:24:45 -0400
commitc7a9baba5db7421de9ca6170b252efc4e35a20f5 (patch)
tree4eb97281ddaac573c97677e6a7f5e520362b8909
parenta71fd905ecb2bb55cb63de5d05dd5a9ae3583cc7 (diff)
downloadsha2-c7a9baba5db7421de9ca6170b252efc4e35a20f5.tar.bz2
sha2-c7a9baba5db7421de9ca6170b252efc4e35a20f5.zip
mv sha2{56,}.[hc]
-rw-r--r--Makefile2
-rw-r--r--main.c4
-rw-r--r--sha2.c (renamed from sha256.c)2
-rw-r--r--sha2.h (renamed from sha256.h)0
-rw-r--r--tests.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 25e3b41..9558fc9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CFLAGS=-std=c11 -W -Wall -Wextra -pedantic -O3 -march=native
-OBJS=sha256.o main.o tests.o
+OBJS=sha2.o main.o tests.o
APP=sha256
.PHONY=all clean
diff --git a/main.c b/main.c
index 136a363..a5c14da 100644
--- a/main.c
+++ b/main.c
@@ -1,6 +1,6 @@
#include <stdio.h> // printf()
#include <string.h> // strlen()
-#include "sha256.h"
+#include "sha2.h"
#include "tests.h"
static void print_hash(const uint8_t * const hash) {
@@ -32,7 +32,7 @@ static void on_test_fail(
}
static uint8_t dst[SHA256_HASH_SIZE];
-static uint8_t buf[1 << 20];
+static uint8_t buf[1 << 21];
int main(int argc, char *argv[]) {
if (argc > 1) {
diff --git a/sha256.c b/sha2.c
index a17cd3e..84667a8 100644
--- a/sha256.c
+++ b/sha2.c
@@ -1,4 +1,4 @@
-#include "sha256.h"
+#include "sha2.h"
#include <string.h> // memcpy
// extract bytes from uint32_t
diff --git a/sha256.h b/sha2.h
index 01cf08b..01cf08b 100644
--- a/sha256.h
+++ b/sha2.h
diff --git a/tests.c b/tests.c
index 3e3d430..f0396ca 100644
--- a/tests.c
+++ b/tests.c
@@ -1,5 +1,5 @@
#include <string.h> // memcmp()
-#include "sha256.h"
+#include "sha2.h"
#include "tests.h"
#define DEF_TEST_FUNC(size) \