1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0-only 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * sha256_ce_glue.c - SHA-256 secure hash using ARMv8 Crypto Extensions 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 2022 Linaro Ltd <loic.poulain@linaro.org> 6*4882a593Smuzhiyun */ 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun #include <common.h> 9*4882a593Smuzhiyun #include <u-boot/sha256.h> 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun extern void sha256_armv8_ce_process(uint32_t state[8], uint8_t const *src, 12*4882a593Smuzhiyun uint32_t blocks); 13*4882a593Smuzhiyun sha256_process(sha256_context * ctx,const unsigned char * data,unsigned int blocks)14*4882a593Smuzhiyunvoid sha256_process(sha256_context *ctx, const unsigned char *data, 15*4882a593Smuzhiyun unsigned int blocks) 16*4882a593Smuzhiyun { 17*4882a593Smuzhiyun if (!blocks) 18*4882a593Smuzhiyun return; 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun sha256_armv8_ce_process(ctx->state, data, blocks); 21*4882a593Smuzhiyun } 22