blob: 949459493fed55b9894b48b1def254d0deb895dc (
plain)
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
|
/*
* Copyright (C) 2013-2014 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* José Bollo <jose.bollo@open.eurogiciel.org>
* Stéphane Desneux <stephane.desneux@open.eurogiciel.org>
* Jean-Benoit Martin <jean-benoit.martin@open.eurogiciel.org>
*
*/
#ifndef SHA256SUM_H
#define SHA256SUM_H
struct sha256sum;
struct sha256sum *sha256sum_create();
void sha256sum_destroy(struct sha256sum *s);
int sha256sum_add_data(struct sha256sum *s, const void *data, size_t length);
int sha256sum_add_file(struct sha256sum *s, const char *filename);
int sha256sum_get(struct sha256sum *s, char result[32]);
#endif
|