source: EcnlProtoTool/trunk/openssl-1.1.0e/crypto/blake2/m_blake2b.c@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc
File size: 1.4 KB
Line 
1/*
2 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10/*
11 * Derived from the BLAKE2 reference implementation written by Samuel Neves.
12 * Copyright 2012, Samuel Neves <sneves@dei.uc.pt>
13 * More information about the BLAKE2 hash function and its implementations
14 * can be found at https://blake2.net.
15 */
16
17#include "internal/cryptlib.h"
18
19#ifndef OPENSSL_NO_BLAKE2
20
21# include <openssl/evp.h>
22# include <openssl/objects.h>
23# include "blake2_locl.h"
24# include "internal/evp_int.h"
25
26static int init(EVP_MD_CTX *ctx)
27{
28 return BLAKE2b_Init(EVP_MD_CTX_md_data(ctx));
29}
30
31static int update(EVP_MD_CTX *ctx, const void *data, size_t count)
32{
33 return BLAKE2b_Update(EVP_MD_CTX_md_data(ctx), data, count);
34}
35
36static int final(EVP_MD_CTX *ctx, unsigned char *md)
37{
38 return BLAKE2b_Final(md, EVP_MD_CTX_md_data(ctx));
39}
40
41static const EVP_MD blake2b_md = {
42 NID_blake2b512,
43 0,
44 BLAKE2B_DIGEST_LENGTH,
45 0,
46 init,
47 update,
48 final,
49 NULL,
50 NULL,
51 BLAKE2B_BLOCKBYTES,
52 sizeof(EVP_MD *) + sizeof(BLAKE2B_CTX),
53};
54
55const EVP_MD *EVP_blake2b512(void)
56{
57 return (&blake2b_md);
58}
59#endif
Note: See TracBrowser for help on using the repository browser.