summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2020-04-22 17:38:58 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-14 07:25:57 +0000
commit69a887265d737c628a3c55a03b923917cf1b471e (patch)
treef962af23da7cfdfb8695eca5731c59708bacec9d /include
parent8d785e9597c9db3444c01d15dff732bef85fad5a (diff)
downloadchrome-ec-69a887265d737c628a3c55a03b923917cf1b471e.tar.gz
crypto_api: use const void
This is a minor API clean up, it is not entirely clear why const void pointers were not used originally, but using this type for input data (and void pointer for output) makes interfacing with the library much easier. Also modified cases where the first parameter of DCRYPTO_SHA1_hash() was typecasted unnecessarily. BUG=none TEST=make buildall succeeds, Cr50 image supports booting a Chrome OS device just fine. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Change-Id: Ic8a670aa7b26598ea323182845c184b7f1d715a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2163568 Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/crypto_api.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/crypto_api.h b/include/crypto_api.h
index 8a8ccacf99..d3e3cfaa4a 100644
--- a/include/crypto_api.h
+++ b/include/crypto_api.h
@@ -26,8 +26,8 @@ extern "C" {
* value exceeds SHA1 size (20 bytes), the rest of the
* hash is filled up with zeros.
*/
-void app_compute_hash(uint8_t *p_buf, size_t num_bytes,
- uint8_t *p_hash, size_t hash_len);
+void app_compute_hash(const void *p_buf, size_t num_bytes, void *p_hash,
+ size_t hash_len);
#define CIPHER_SALT_SIZE 16