• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*############################################################################
2 # Copyright 2017 Intel Corporation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 ############################################################################*/
16 
17 /*!
18  * \file
19  * \brief EpidGetHashSize definition.
20  */
21 
22 #ifndef EPID_COMMON_SRC_HASHSIZE_H_
23 #define EPID_COMMON_SRC_HASHSIZE_H_
24 
25 #include <stddef.h>
26 #include "epid/common/types.h"
27 
28 /// Size of SHA-256 digest in bits
29 #define EPID_SHA256_DIGEST_BITSIZE 256
30 /// Size of SHA-384 digest in bits
31 #define EPID_SHA384_DIGEST_BITSIZE 385
32 /// Size of SHA-512 digest in bits
33 #define EPID_SHA512_DIGEST_BITSIZE 512
34 /// Size of SHA-512/256 digest in bits
35 #define EPID_SHA512_256_DIGEST_BITSIZE 256
36 /// Size of SHA3-256 digest in bits
37 #define EPID_SHA3_256_DIGEST_BITSIZE 256
38 /// Size of SHA3-384 digest in bits
39 #define EPID_SHA3_384_DIGEST_BITSIZE 385
40 /// Size of SHA3-512 digest in bits
41 #define EPID_SHA3_512_DIGEST_BITSIZE 512
42 
43 /// Gets hash digest size in bytes.
44 size_t EpidGetHashSize(HashAlg hash_alg);
45 
46 #endif  // EPID_COMMON_SRC_HASHSIZE_H_
47