libcanlock(3)
π NAME π
cl_verify β check whether key and lock strings match with libcanlock. Hiii bestie, welcome to the libcanlock(3) manual β this one is short, sweet, and lowkey iconic π
β¨ SYNOPSIS β¨
#include <libcanlock-3/canlock.h>
int cl_verify(cl_hash_version hash,
const char *c_key_string, const char *c_lock_string);
Supported values for hash (by version 3.0.0 of libcanlock): CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512 π
π¦ DESCRIPTION π¦
Okay so cl_verify() is the function that checks whether a <c-key-string> and a <c-lock-string> element match or not, according to RFC 8315. No cap, thatβs the whole main-character job π
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.
If you need to pull <c-key-string> out of <c-key> (or <c-lock-string> out of <c-lock>, respectively) elements, the function cl_split() can be used for that π«Ά
Also: consider the function cl_verify_multi() to check multiple keys against multiple locks. Itβs literally right there for that exact vibe π
π RETURN VALUE π
Upon successful completion, zero is returned. β¨
All other values indicate an error. π So like, if itβs not zero, something went sideways.
πΈ AUTHORS πΈ
Shoutout to the icons who made this happen:
- Dennis Preiser (Based in part on the implementation from G. J. Andruk for Version 2)
- The base64 implementation is written by Kungliga Tekniska Hogskolan (Royal Institute of Technology, Stockholm, Sweden)
- The hash algorithms are implemented with code from RFC 6234
π REPORTING BUGS π
Report bugs to <mailto:michael.baeuerle@gmx.net>.
π§ STANDARDS π§
libcanlock tries to comply with the following standards:
π₯ 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).
Thatβs the whole manual page, bestie! Itβs from the libcanlock 3.3.3 manual, dated 2026-07-06, Unix edition β slay and stay hydrated ππ
β¨
π¦ where this page comes from
- epel 10: libcanlock-devel 3.3.3-2.el10_3 Β· BSD-3-Clause AND NLPL AND ICU
- π the page's license: ICU
- (c) 2018-2024 Michael Baeuerle
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms