Blame


1 1362b0e3 2023-02-04 op /*
2 1362b0e3 2023-02-04 op * Copyright (c) 2018 Stefan Sperling <stsp@openbsd.org>
3 1362b0e3 2023-02-04 op *
4 1362b0e3 2023-02-04 op * Permission to use, copy, modify, and distribute this software for any
5 1362b0e3 2023-02-04 op * purpose with or without fee is hereby granted, provided that the above
6 1362b0e3 2023-02-04 op * copyright notice and this permission notice appear in all copies.
7 1362b0e3 2023-02-04 op *
8 1362b0e3 2023-02-04 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 1362b0e3 2023-02-04 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 1362b0e3 2023-02-04 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 1362b0e3 2023-02-04 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 1362b0e3 2023-02-04 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 1362b0e3 2023-02-04 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 1362b0e3 2023-02-04 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 1362b0e3 2023-02-04 op */
16 1362b0e3 2023-02-04 op
17 1362b0e3 2023-02-04 op #define GOT_SHA1_STRING_ZERO "0000000000000000000000000000000000000000"
18 1362b0e3 2023-02-04 op #define GOT_SHA256_STRING_ZERO "0000000000000000000000000000000000000000000000000000000000000000"
19 1362b0e3 2023-02-04 op
20 1362b0e3 2023-02-04 op int got_parse_xdigit(uint8_t *, const char *);
21 1362b0e3 2023-02-04 op
22 1362b0e3 2023-02-04 op int got_parse_sha1_digest(uint8_t *, const char *);
23 1362b0e3 2023-02-04 op char *got_sha1_digest_to_str(const uint8_t *, char *, size_t);
24 1362b0e3 2023-02-04 op
25 1362b0e3 2023-02-04 op int got_parse_sha256_digest(uint8_t *, const char *);
26 1362b0e3 2023-02-04 op char *got_sha256_digest_to_str(const uint8_t *, char *, size_t);
27 87a4b05f 2023-02-04 op
28 87a4b05f 2023-02-04 op int got_parse_hash_digest(uint8_t *, const char *, int, size_t *);