cl_verify - Check whether key and lock strings match with libcanlock
Contents
Description
The cl_verify() function checks whether a <c-key-string> and a <c-lock-string> element according to RFC
8315 matches or not.
The hash algorithm for <scheme> is selected with hash.
The <c-key-string> element is specified with c_key_string and the <c-lock-string> element with
c_lock_string.
The function cl_split() can be used to extract <c-key-string> from <c-key> (or <c-lock-string> from <c-
lock> respectively) elements.
Consider the function cl_verify_multi() to check multiple keys against multiple locks.
Name
cl_verify - Check whether key and lock strings match with libcanlock
Reporting Bugs
Report bugs to <mailto:michael.baeuerle@gmx.net>.
Return Value
Upon successful completion zero is returned.
All other values indicate an error.
See Also
cl_clear_secret(3), cl_get_key(3), cl_get_lock(3), cl_split(3), cl_verify_multi(3), cl_hp_get_field(3),cl_hp_unfold_field(3),cl_hp_parse_field(3),canlock(1), canlock-hfp(1), canlock-mhp(1) Unix 2024-05-11 libcanlock(3)
Standards
libcanlock tries to comply with the following standards:
RFC 5537, RFC 6234, RFC 8315
Synopsis
#include<libcanlock-3/canlock.h>intcl_verify(cl_hash_versionhash,constchar*c_key_string,constchar*c_lock_string);
Supported values for hash (by version 3.0.0 of libcanlock):
CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512
