Review comments
[openssl.git] / crypto / blake2 / m_blake2s.c
similarity index 55%
rename from crypto/evp/m_blake2s.c
rename to crypto/blake2/m_blake2s.c
index 511b192c1d646da0a9a2b9f25c9617ecca110949..01974d966c6b0fda9fc097863f9b1f8fc5b3d326 100644 (file)
@@ -1,22 +1,20 @@
 /*
- * BLAKE2 reference source code package - reference C implementations
- *
  * Copyright 2012, Samuel Neves <sneves@dei.uc.pt>.
- * You may use this under the terms of the CC0, the OpenSSL Licence, or the
- * Apache Public License 2.0, at your option.  The terms of these licenses can
- * be found at:
- *
- * - OpenSSL license   : https://www.openssl.org/source/license.html
- * - Apache 2.0        : http://www.apache.org/licenses/LICENSE-2.0
- * - CC0 1.0 Universal : http://www.apache.org/licenses/LICENSE-2.0
+ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  *
- * More information about the BLAKE2 hash function can be found at
- * https://blake2.net.
+ * Licensed under the OpenSSL licenses, (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * https://www.openssl.org/source/license.html
+ * or in the file LICENSE in the source distribution.
  */
 
-/* crypto/evp/m_blake2s.c */
+/*
+ * Derived from the BLAKE2 reference implementation written by Samuel Neves.
+ * More information about the BLAKE2 hash function and its implementations
+ * can be found at https://blake2.net.
+ */
 
-#include <stdio.h>
 #include "internal/cryptlib.h"
 
 #ifndef OPENSSL_NO_BLAKE2
@@ -42,7 +40,7 @@ static int final(EVP_MD_CTX *ctx, unsigned char *md)
 }
 
 static const EVP_MD blake2s_md = {
-    NID_blake2s,
+    NID_blake2s256,
     0,
     BLAKE2S_DIGEST_LENGTH,
     0,
@@ -55,7 +53,7 @@ static const EVP_MD blake2s_md = {
     sizeof(EVP_MD *) + sizeof(BLAKE2S_CTX),
 };
 
-const EVP_MD *EVP_blake2s(void)
+const EVP_MD *EVP_blake2s256(void)
 {
     return (&blake2s_md);
 }