blob: d5d2b4f4ac7e4c0fdae40c28822648d48b19efae [file] [log] [blame]
Loic Poulain040abf62022-06-01 20:26:31 +02001// 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
Loic Poulain040abf62022-06-01 20:26:31 +02008#include <u-boot/sha256.h>
9
10extern void sha256_armv8_ce_process(uint32_t state[8], uint8_t const *src,
11 uint32_t blocks);
12
13void sha256_process(sha256_context *ctx, const unsigned char *data,
14 unsigned int blocks)
15{
16 if (!blocks)
17 return;
18
19 sha256_armv8_ce_process(ctx->state, data, blocks);
20}