($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
blob 531fcb0aad793cefcd66be55eb1e155db155da4a 2212 bytes (raw)
name: ell/checksum.h 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
 
/*
 *
 *  Embedded Linux library
 *
 *  Copyright (C) 2011-2014  Intel Corporation. All rights reserved.
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#ifndef __ELL_CHECKSUM_H
#define __ELL_CHECKSUM_H

#include <stdbool.h>
#include <stdint.h>
#include <sys/uio.h>

#ifdef __cplusplus
extern "C" {
#endif

struct l_checksum;

enum l_checksum_type {
	L_CHECKSUM_NONE,
	L_CHECKSUM_MD4,
	L_CHECKSUM_MD5,
	L_CHECKSUM_SHA1,
	L_CHECKSUM_SHA224,
	L_CHECKSUM_SHA256,
	L_CHECKSUM_SHA384,
	L_CHECKSUM_SHA512,
};

struct l_checksum *l_checksum_new(enum l_checksum_type type);
struct l_checksum *l_checksum_new_cmac_aes(const void *key, size_t key_len);
struct l_checksum *l_checksum_new_hmac(enum l_checksum_type type,
					const void *key, size_t key_len);
struct l_checksum *l_checksum_clone(struct l_checksum *checksum);

void l_checksum_free(struct l_checksum *checksum);

void l_checksum_reset(struct l_checksum *checksum);

bool l_checksum_update(struct l_checksum *checksum,
					const void *data, size_t len);
bool l_checksum_updatev(struct l_checksum *checksum,
					const struct iovec *iov,
					size_t iov_len);
ssize_t l_checksum_get_digest(struct l_checksum *checksum,
					void *digest, size_t len);
char *l_checksum_get_string(struct l_checksum *checksum);

bool l_checksum_is_supported(enum l_checksum_type type, bool check_hmac);
bool l_checksum_cmac_aes_supported(void);

ssize_t l_checksum_digest_length(enum l_checksum_type type);

#ifdef __cplusplus
}
#endif

#endif /* __ELL_CHECKSUM_H */

debug log:

solving 531fcb0 ...
found 531fcb0 in https://yhbt.net/lore/pub/scm/libs/ell/ell.git/

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).