Blame


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