1
/* -*- buffer-read-only: t -*- vi: set ro: */
2
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3
/* Declarations of functions and data types used for SHA1 sum
5
Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008, 2009, 2010 Free Software
8
This program is free software; you can redistribute it and/or modify it
9
under the terms of the GNU General Public License as published by the
10
Free Software Foundation; either version 3, or (at your option) any
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software Foundation,
20
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
32
#define SHA1_DIGEST_SIZE 20
34
/* Structure to save state of computation between the single steps. */
49
/* Initialize structure containing state of computation. */
50
extern void sha1_init_ctx (struct sha1_ctx *ctx);
52
/* Starting with the result of former calls of this function (or the
53
initialization function update the context for the next LEN bytes
55
It is necessary that LEN is a multiple of 64!!! */
56
extern void sha1_process_block (const void *buffer, size_t len,
57
struct sha1_ctx *ctx);
59
/* Starting with the result of former calls of this function (or the
60
initialization function update the context for the next LEN bytes
62
It is NOT required that LEN is a multiple of 64. */
63
extern void sha1_process_bytes (const void *buffer, size_t len,
64
struct sha1_ctx *ctx);
66
/* Process the remaining bytes in the buffer and put result from CTX
67
in first 20 bytes following RESBUF. The result is always in little
68
endian byte order, so that a byte-wise output yields to the wanted
69
ASCII representation of the message digest. */
70
extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
73
/* Put result from CTX in first 20 bytes following RESBUF. The result is
74
always in little endian byte order, so that a byte-wise output yields
75
to the wanted ASCII representation of the message digest. */
76
extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
79
/* Compute SHA1 message digest for bytes read from STREAM. The
80
resulting message digest number will be written into the 20 bytes
81
beginning at RESBLOCK. */
82
extern int sha1_stream (FILE *stream, void *resblock);
84
/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The
85
result is always in little endian byte order, so that a byte-wise
86
output yields to the wanted ASCII representation of the message
88
extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);