logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

cl_split - Split Cancel-Key or Cancel-Lock with libcanlock

Authors

       Michael Baeuerle
       (Based in part on lock_strip_alpha() written by G. J. Andruk for Version 2)

Description

       The cl_split() function splits a <c-key> or <c-lock> element according to RFC 8315.

       The  hash algorithm for <scheme> is extracted and the corresponding ID is returned. If the hash algorithm
       is not found or not supported, CL_INVALID is returned.

       A pointer to the <c-key-string> or <c-lock-string> element respectively is written to klstring on success
       (points inside the string input and therefore no additional memory is allocated).
       NULL is written to klstring on error.

Name

       cl_split - Split Cancel-Key or Cancel-Lock with libcanlock

Reporting Bugs

Return Value

       Hash algorithm ID (CL_INVALID on error).

See Also

cl_clear_secret(3), cl_get_key(3), cl_get_lock(3), cl_verify(3), cl_verify_multi(3), canlock(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>cl_hash_versioncl_split(char*input,char**klstring);

       Possible return values (by version 3.0.0 of libcanlock):
       CL_INVALID CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512

See Also