Debian Codegraph @

doc/cl_split.in3

raw
1 .\"=============================================================================
2 .\" Header
3 .\"
4 .\" Copyright (c) 2018-2024 Michael Baeuerle
5 .\"
6 .\" All rights reserved.
7 .\"
8 .\" Permission is hereby granted, free of charge, to any person obtaining
9 .\" a copy of this software and associated documentation files (the
10 .\" "Software"), to deal in the Software without restriction, including
11 .\" without limitation the rights to use, copy, modify, merge, publish,
12 .\" distribute, and/or sell copies of the Software, and to permit persons
13 .\" to whom the Software is furnished to do so, provided that the above
14 .\" copyright notice(s) and this permission notice appear in all copies of
15 .\" the Software and that both the above copyright notice(s) and this
16 .\" permission notice appear in supporting documentation.
17 .\"
18 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
21 .\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
22 .\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
23 .\" SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
24 .\" RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
25 .\" CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26 .\" CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27 .\"
28 .\" Except as contained in this notice, the name of a copyright holder
29 .\" shall not be used in advertising or otherwise to promote the sale, use
30 .\" or other dealings in this Software without prior written authorization
31 .\" of the copyright holder.
32 .\"
33 .\" SPDX-License-Identifier: ICU
34 .\"
35 .\"
36 .TH $NAME 3 $DATE Unix "$NAME $VERSION manual"
37 .\"
38 .\"
39 .\"=============================================================================
40 .\" NAME section
41 .\"
42 .SH NAME
43 cl_split - Split Cancel-Key or Cancel-Lock with $NAME
44 .\"
45 .\"
46 .\"=============================================================================
47 .\" SYNOPSIS section
48 .\"
49 .SH SYNOPSIS
50 .nf
51 .B #include <libcanlock-3/canlock.h>
52 .sp
53 .BI "cl_hash_version cl_split(char *" input ", char **" klstring );
54 .fi
55 .sp
56 Possible return values (by version 3.0.0 of $NAME):
57 .br
58 CL_INVALID CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512
59 .\"
60 .\"
61 .\"=============================================================================
62 .\" DESCRIPTION section
63 .\"
64 .SH DESCRIPTION
65 The
66 .BR cl_split ()
67 function splits a <c-key> or <c-lock> element according to RFC 8315.
68 .sp
69 The hash algorithm for <scheme> is extracted and the corresponding ID is
70 returned. If the hash algorithm is not found or not supported, CL_INVALID
71 is returned.
72 .sp
73 A pointer to the <c-key-string> or <c-lock-string> element respectively is
74 written to
75 .I klstring
76 on success (points inside the string
77 .I input
78 and therefore no additional memory is allocated).
79 .br
80 NULL is written to
81 .I klstring
82 on error.
83 .\"
84 .\"
85 .\"=============================================================================
86 .\" RETURN VALUE section
87 .\"
88 .SH RETURN VALUE
89 Hash algorithm ID (CL_INVALID on error).
90 .\"
91 .\"
92 .\"=============================================================================
93 .\" AUTHORS section
94 .\"
95 .SH AUTHORS
96 Michael Baeuerle
97 .br
98 (Based in part on
99 .BR lock_strip_alpha()
100 written by G. J. Andruk for Version 2)
101 .\"
102 .\"
103 .\"=============================================================================
104 .\" REPORTING BUGS section
105 .\"
106 .SH REPORTING BUGS
107 Report bugs to <mailto:$BUGREPORT>.
108 .\"
109 .\"
110 .\"=============================================================================
111 .\" STANDARDS section
112 .\"
113 .SH STANDARDS
114 .B $NAME
115 tries to comply with the following standards:
116 .PP
117 RFC 5537, RFC 6234, RFC 8315
118 .\"
119 .\"
120 .\"=============================================================================
121 .\" SEE ALSO section
122 .\"
123 .SH SEE ALSO
124 .BR cl_clear_secret (3),
125 .BR cl_get_key (3),
126 .BR cl_get_lock (3),
127 .BR cl_verify (3),
128 .BR cl_verify_multi (3),
129 .BR canlock (1)
130 .\"
131 .\"
132 .\" EOF