Coverage Report

Created: 2026-10-17 06:38

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/barebox/include/crypto/pbl-sha.h
Line
Count
Source
1
/* SPDX-License-Identifier: GPL-2.0 */
2
#ifndef __PBL_SHA_H_
3
4
#define __PBL_SHA_H_
5
6
#include <crypto/sha.h>
7
#include <digest.h>
8
#include <types.h>
9
10
int sha256_init(struct digest *desc);
11
int sha256_update(struct digest *desc, const void *data, unsigned long len);
12
int sha256_final(struct digest *desc, u8 *out);
13
14
/* One-shot SHA-256 that picks the best transform available in the PBL. */
15
void pbl_sha256(const void *buf, size_t len, u8 out[SHA256_DIGEST_SIZE]);
16
17
#ifdef CONFIG_DIGEST_SHA256_ARM64_CE
18
/* ARMv8 Crypto Extensions transform; returns -EOPNOTSUPP if unavailable. */
19
int pbl_sha256_ce(const void *buf, size_t len, u8 out[SHA256_DIGEST_SIZE]);
20
#else
21
static inline int pbl_sha256_ce(const void *buf, size_t len, u8 out[SHA256_DIGEST_SIZE])
22
0
{
23
0
  return -EOPNOTSUPP;
24
0
}
Unexecuted instantiation: sha2.c:pbl_sha256_ce
Unexecuted instantiation: sha256.c:pbl_sha256_ce
25
#endif
26
27
#endif /* __PBL-SHA_H_ */