Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/BLAKE2/BLAKE2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Neves <sneves@users.noreply.github.com>2015-11-05 10:38:38 +0300
committerSamuel Neves <sneves@users.noreply.github.com>2015-11-05 10:38:38 +0300
commit2d362fbb682f6edb43e2a2f9e2a3e029c94c89e8 (patch)
treef2568da23ffc01b909781eb7e8da5dafd62c4662
parent93fda424a1fe0566ce0ef41459bd6e2962443ba8 (diff)
parente247f0477aef192e4cd30c382933fb3fe5a14879 (diff)
Merge pull request #3 from neheb/master
Fix makefiles + bench fix
-rw-r--r--b2sum/makefile2
-rw-r--r--ref/blake2b-ref.c7
-rw-r--r--ref/blake2s-ref.c7
-rw-r--r--ref/makefile2
4 files changed, 16 insertions, 2 deletions
diff --git a/b2sum/makefile b/b2sum/makefile
index 806cc72..5b79ee2 100644
--- a/b2sum/makefile
+++ b/b2sum/makefile
@@ -1,7 +1,7 @@
CC=gcc
CFLAGS=-std=c99 -O3 -march=native -I../sse -static -fopenmp
LIBS=
-#FILES=blake2sum.c ../ref/blake2b-ref.c ../ref/blake2s-ref.c ../ref/blake2bp-ref.c ../ref/blake2sp-ref.c
+#FILES=b2sum.c ../ref/blake2b-ref.c ../ref/blake2s-ref.c ../ref/blake2bp-ref.c ../ref/blake2sp-ref.c
FILES=b2sum.c ../sse/blake2b.c ../sse/blake2s.c ../sse/blake2bp.c ../sse/blake2sp.c
all: $(FILES)
$(CC) $(FILES) $(CFLAGS) $(LIBS) -o b2sum
diff --git a/ref/blake2b-ref.c b/ref/blake2b-ref.c
index f9e852a..8f295a7 100644
--- a/ref/blake2b-ref.c
+++ b/ref/blake2b-ref.c
@@ -365,6 +365,13 @@ int blake2b( uint8_t *out, const void *in, const void *key, const uint8_t outlen
return 0;
}
+#if defined(SUPERCOP)
+int crypto_hash( unsigned char *out, unsigned char *in, unsigned long long inlen )
+{
+ return blake2b( out, in, NULL, BLAKE2B_OUTBYTES, inlen, 0 );
+}
+#endif
+
#if defined(BLAKE2B_SELFTEST)
#include <string.h>
#include "blake2-kat.h"
diff --git a/ref/blake2s-ref.c b/ref/blake2s-ref.c
index 0746ac5..7cc3845 100644
--- a/ref/blake2s-ref.c
+++ b/ref/blake2s-ref.c
@@ -353,6 +353,13 @@ int blake2s( uint8_t *out, const void *in, const void *key, const uint8_t outlen
return 0;
}
+#if defined(SUPERCOP)
+int crypto_hash( unsigned char *out, unsigned char *in, unsigned long long inlen )
+{
+ return blake2s( out, in, NULL, BLAKE2S_OUTBYTES, inlen, 0 );
+}
+#endif
+
#if defined(BLAKE2S_SELFTEST)
#include <string.h>
#include "blake2-kat.h"
diff --git a/ref/makefile b/ref/makefile
index ba7af59..6e673ec 100644
--- a/ref/makefile
+++ b/ref/makefile
@@ -1,4 +1,4 @@
-CC?=gcc
+CC=gcc
CFLAGS=-std=c99 -Wall -pedantic
all: blake2s blake2b blake2sp blake2bp