#include <libcanlock-3/canlock.h> char *cl_get_key(cl_hash_version hash, const unsigned char *sec, size_t sec_len, const unsigned char *msg, size_t msg_len);
Supported values for
(by version 3.0.0 of libcanlock):
CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512
The hash algorithm for <scheme> is selected with hash.
The local secret is specified with sec (sec_len must be set to the length of sec).
The Message-ID of the target article (the one that should be cancelled or superseded) is specified with msg (msg_len must be set to the length of msg).
On success the caller is responsible to call free(3) for the pointer returned as result.
The base64 implementation is written by Kungliga Tekniska Hogskolan (Royal Institute of Technology, Stockholm, Sweden)
The hash algorithms are implemented with code from RFC6234
RFC5537, RFC6234, RFC8315