Loic Poulain | 040abf6 | 2022-06-01 20:26:31 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
| 2 | /* |
| 3 | * sha256_ce_glue.c - SHA-256 secure hash using ARMv8 Crypto Extensions |
| 4 | * |
| 5 | * Copyright (C) 2022 Linaro Ltd <loic.poulain@linaro.org> |
| 6 | */ |
| 7 | |
Tom Rini | abb9a04 | 2024-05-18 20:20:43 -0600 | [diff] [blame] | 8 | #include <common.h> |
Loic Poulain | 040abf6 | 2022-06-01 20:26:31 +0200 | [diff] [blame] | 9 | #include <u-boot/sha256.h> |
| 10 | |
| 11 | extern void sha256_armv8_ce_process(uint32_t state[8], uint8_t const *src, |
| 12 | uint32_t blocks); |
| 13 | |
| 14 | void sha256_process(sha256_context *ctx, const unsigned char *data, |
| 15 | unsigned int blocks) |
| 16 | { |
| 17 | if (!blocks) |
| 18 | return; |
| 19 | |
| 20 | sha256_armv8_ce_process(ctx->state, data, blocks); |
| 21 | } |