diff options
author | Randall Spangler <rspangler@chromium.org> | 2014-10-15 13:41:52 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-16 02:05:07 +0000 |
commit | f2f88042ed3a095819312c57d28e2d93e68d5c37 (patch) | |
tree | febbad7fe1af71aec62a176ad5fc88c4b78c8cf3 /firmware/2lib/include/2sha.h | |
parent | 3638625d351ec0a0ba32d7cf8172dda179235db9 (diff) | |
download | vboot-f2f88042ed3a095819312c57d28e2d93e68d5c37.tar.gz |
vboot2: Split crypto algorithms into their own header file
This allows the algorithm list to be shared by code which simply needs
to look at the vboot structures.
No functional changes; just moving enums around and adding comments.
BUG=chromium:423882
BRANCH=none
TEST=make runtests; VBOOT2=1 make runtests
Change-Id: Ia8cefeffb28d5eceb290540195193ea13e68e2c1
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223541
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'firmware/2lib/include/2sha.h')
-rw-r--r-- | firmware/2lib/include/2sha.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/2lib/include/2sha.h b/firmware/2lib/include/2sha.h index 83a2c624..73efd96b 100644 --- a/firmware/2lib/include/2sha.h +++ b/firmware/2lib/include/2sha.h @@ -6,6 +6,8 @@ #ifndef VBOOT_REFERENCE_2SHA_H_ #define VBOOT_REFERENCE_2SHA_H_ +#include "2crypto.h" + /* Hash algorithms may be disabled individually to save code space */ #ifndef VB2_SUPPORT_SHA1 @@ -73,7 +75,7 @@ struct vb2_digest_context { #endif }; - /* Current hash algorithms */ + /* Current hash algorithm (enum vb2_crypto_algorithm) */ uint32_t algorithm; }; @@ -116,7 +118,7 @@ void vb2_sha512_finalize(struct vb2_sha512_context *ctx, uint8_t *digest); /** * Return the size of the digest for a key algorithm. * - * @param algorithm Key algorithm + * @param algorithm Key algorithm (enum vb2_crypto_algorithm) * @return The size of the digest, or 0 if error. */ int vb2_digest_size(uint32_t algorithm); @@ -125,7 +127,7 @@ int vb2_digest_size(uint32_t algorithm); * Initialize a digest context for doing block-style digesting. * * @param dc Digest context - * @param algorithm Key algorithm + * @param algorithm Key algorithm (enum vb2_crypto_algorithm) * @return VB2_SUCCESS, or non-zero on error. */ int vb2_digest_init(struct vb2_digest_context *dc, uint32_t algorithm); |