aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/eltan/security/include/cb_sha.h
diff options
context:
space:
mode:
authorWim Vervoorn <wvervoorn@eltan.com>2019-10-30 16:46:41 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-04 11:30:17 +0000
commit944fdc477140d874c1c674954044c0c2b540abb2 (patch)
treeddce8d938bbd37ee409e8289c5b2144e492eed24 /src/vendorcode/eltan/security/include/cb_sha.h
parentadf344013d30dc685bab3dbd148bdecb35e833b1 (diff)
vendorcode/eltan/security: Use custom hash for little endian only
Only use the custom hash routine when we need little endian. Rename the function as well as it is little endian only now. BUG=N/A TEST=tested on fbg1701 board. Change-Id: I037fa38c5961dab7a81e752c1685da2dc6b33d12 Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36482 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Diffstat (limited to 'src/vendorcode/eltan/security/include/cb_sha.h')
-rw-r--r--src/vendorcode/eltan/security/include/cb_sha.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/vendorcode/eltan/security/include/cb_sha.h b/src/vendorcode/eltan/security/include/cb_sha.h
index 4d087f40c9..9a231d8a1e 100644
--- a/src/vendorcode/eltan/security/include/cb_sha.h
+++ b/src/vendorcode/eltan/security/include/cb_sha.h
@@ -20,14 +20,7 @@
#include <vb21_common.h>
#include <vb2_api.h>
-/* Supported Algorithm types for hash */
-enum endian_algorithm {
- NO_ENDIAN_ALGORITHM = 0,
- BIG_ENDIAN_ALGORITHM = 1,
- LITTLE_ENDIAN_ALGORITHM = 2,
-};
+vb2_error_t cb_sha_little_endian(enum vb2_hash_algorithm hash_alg, const uint8_t *data,
+ uint32_t len, uint8_t *digest);
-int cb_sha_endian(enum vb2_hash_algorithm hash_alg, const uint8_t *data, uint32_t len,
- uint8_t *digest, enum endian_algorithm endian);
-
-#endif \ No newline at end of file
+#endif