1KCAPI_MD_SHA512(3) Programming Interface KCAPI_MD_SHA512(3)
2
3
4
6 kcapi_md_sha512 - SHA-512 message digest on one buffer
7
9 ssize_t kcapi_md_sha512(const uint8_t * in, size_t inlen,
10 uint8_t * out, size_t outlen);
11
13 in
14 [in] buffer with input data
15
16 inlen
17 [in] length of input buffer
18
19 out
20 [out] buffer for message digest
21
22 outlen
23 [in] length of out
24
26 With this one-shot convenience function, a message digest of the given
27 buffer is generated. The output buffer must be allocated by the caller
28 and have at least the length of the message digest size for the chosen
29 message digest.
30
31 return size of message digest upon success; -EIO - data cannot be
32 obtained; -ENOMEM - buffer is too small for the complete message
33 digest, the buffer is filled with the truncated message digest
34
36 Stephan Mueller <smueller@chronox.de>
37 Author.
38
40libkcapi Manual 1.4.0 January 2023 KCAPI_MD_SHA512(3)