/src/openssl/crypto/evp/legacy_blake2.c
Line | Count | Source |
1 | | /* |
2 | | * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. |
3 | | * |
4 | | * Licensed under the Apache License 2.0 (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 | | #include "crypto/evp.h" |
11 | | #include "prov/blake2.h" /* diverse BLAKE2 macros */ |
12 | | |
13 | | static const EVP_MD blake2b_md = { |
14 | | NID_blake2b512, |
15 | | 0, |
16 | | BLAKE2B_DIGEST_LENGTH, |
17 | | 0, |
18 | | EVP_ORIG_GLOBAL, |
19 | | BLAKE2B_BLOCKBYTES, |
20 | | }; |
21 | | |
22 | | const EVP_MD *EVP_blake2b512(void) |
23 | 3 | { |
24 | 3 | return &blake2b_md; |
25 | 3 | } |
26 | | |
27 | | static const EVP_MD blake2s_md = { |
28 | | NID_blake2s256, |
29 | | 0, |
30 | | BLAKE2S_DIGEST_LENGTH, |
31 | | 0, |
32 | | EVP_ORIG_GLOBAL, |
33 | | BLAKE2S_BLOCKBYTES, |
34 | | }; |
35 | | |
36 | | const EVP_MD *EVP_blake2s256(void) |
37 | 3 | { |
38 | 3 | return &blake2s_md; |
39 | 3 | } |