1use wolf_crypto_sys::{
2 wc_Sha,
3 wc_ShaUpdate, wc_ShaFinal,
4 wc_InitSha, wc_ShaFree,
5 wc_ShaCopy
6};
7
8make_api! {
9 sec_warning: "",
10 "The SHA-1 algorithm is included in this library for legacy reasons only. It is \
11 cryptographically broken and should not be used for any security-critical applications, \
12 especially digital signatures or certificate validation.",
13 "",
14 "The U.S. National Institute of Standards and Technology (NIST) has officially deprecated SHA-1 \
15 for all digital signature uses as of 2011. As of 2022, NIST recommends transitioning all \
16 applications to use SHA-2, Keccak (SHA-3) family hash functions.",
17 "",
18 "For more information, refer to \
19 [NIST's policy on hash functions](https://csrc.nist.gov/projects/hash-functions/nist-policy-on-hash-functions).",
20 "",
21 "Use this algorithm only if absolutely necessary for backwards compatibility with legacy \
22 systems. For all other purposes, please use more secure alternatives such as the SHA-2, SHA-3, \
23 and Blake2 family hash functions.",
24 anecdote: "-1",
25 name: Sha,
26 wc: wc_Sha,
27 bs: 20,
28 init: wc_InitSha,
29 update: wc_ShaUpdate,
30 finalize: wc_ShaFinal,
31 free: wc_ShaFree,
32 copy: wc_ShaCopy
33}