hashsize.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. * \file
  18. * \brief EpidGetHashSize definition.
  19. */
  20. #ifndef EPID_COMMON_SRC_HASHSIZE_H_
  21. #define EPID_COMMON_SRC_HASHSIZE_H_
  22. #include <stddef.h>
  23. #include "epid/common/types.h"
  24. /// Size of SHA-256 digest in bits
  25. #define EPID_SHA256_DIGEST_BITSIZE 256
  26. /// Size of SHA-384 digest in bits
  27. #define EPID_SHA384_DIGEST_BITSIZE 385
  28. /// Size of SHA-512 digest in bits
  29. #define EPID_SHA512_DIGEST_BITSIZE 512
  30. /// Size of SHA-512/256 digest in bits
  31. #define EPID_SHA512_256_DIGEST_BITSIZE 256
  32. /// Size of SHA3-256 digest in bits
  33. #define EPID_SHA3_256_DIGEST_BITSIZE 256
  34. /// Size of SHA3-384 digest in bits
  35. #define EPID_SHA3_384_DIGEST_BITSIZE 385
  36. /// Size of SHA3-512 digest in bits
  37. #define EPID_SHA3_512_DIGEST_BITSIZE 512
  38. /// Gets hash digest size in bytes.
  39. size_t EpidGetHashSize(HashAlg hash_alg);
  40. #endif // EPID_COMMON_SRC_HASHSIZE_H_