Artifact [198734fb50]

Artifact 198734fb500236d0f5476927cb45b86beb5c0836be7393959bbcaa7e41a73c0e:


--- a/tweetnacl.c.new
+++ b/tweetnacl.c.new
@@ -516,6 +516,7 @@
   0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
 };
 
+#ifndef SUPERCOP
 int crypto_hashblocks(u8 *x,const u8 *m,u64 n)
 {
   u64 z[8],b[8],a[8],w[16],t;
@@ -584,6 +585,7 @@
 
   return 0;
 }
+#endif
 
 sv add(gf p[4],gf q[4])
 {
--- a/tweetnacl.h.new
+++ b/tweetnacl.h.new
@@ -118,11 +118,15 @@
 #define crypto_hashblocks_sha256_BLOCKBYTES crypto_hashblocks_sha256_tweet_BLOCKBYTES
 #define crypto_hashblocks_sha256_VERSION crypto_hashblocks_sha256_tweet_VERSION
 #define crypto_hashblocks_sha256_IMPLEMENTATION "crypto_hashblocks/sha256/tweet"
+#ifndef SUPERCOP
 #define crypto_hash_PRIMITIVE "sha512"
 #define crypto_hash crypto_hash_sha512
 #define crypto_hash_BYTES crypto_hash_sha512_BYTES
 #define crypto_hash_IMPLEMENTATION crypto_hash_sha512_IMPLEMENTATION
 #define crypto_hash_VERSION crypto_hash_sha512_VERSION
+#else
+#include "blake2-supercop.h"
+#endif
 #define crypto_hash_sha512_tweet_BYTES 64
 extern int crypto_hash_sha512_tweet(unsigned char *,const unsigned char *,unsigned long long);
 #define crypto_hash_sha512_tweet_VERSION "-"