shithub: blake2

Download patch

ref: 2d362fbb682f6edb43e2a2f9e2a3e029c94c89e8
parent: 93fda424a1fe0566ce0ef41459bd6e2962443ba8
parent: e247f0477aef192e4cd30c382933fb3fe5a14879
author: Samuel Neves <sneves@users.noreply.github.com>
date: Thu Nov 5 02:38:38 EST 2015

Merge pull request #3 from neheb/master

Fix makefiles + bench fix

--- 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 
--- a/ref/blake2b-ref.c
+++ b/ref/blake2b-ref.c
@@ -365,6 +365,13 @@
   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"
--- a/ref/blake2s-ref.c
+++ b/ref/blake2s-ref.c
@@ -353,6 +353,13 @@
   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"
--- a/ref/makefile
+++ b/ref/makefile
@@ -1,4 +1,4 @@
-CC?=gcc
+CC=gcc
 CFLAGS=-std=c99 -Wall -pedantic
 
 all:		blake2s blake2b blake2sp blake2bp
--