BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB-UTIL Reference

sha1.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __PJLIB_UTIL_SHA1_H__
20#define __PJLIB_UTIL_SHA1_H__
21
27#include <pj/types.h>
28
30
38typedef struct pj_sha1_context
39{
44
46#define PJ_SHA1_DIGEST_SIZE 20
47
48
52PJ_DECL(void) pj_sha1_init(pj_sha1_context *ctx);
53
59PJ_DECL(void) pj_sha1_update(pj_sha1_context *ctx,
60 const pj_uint8_t *data,
61 const pj_size_t nbytes);
62
67PJ_DECL(void) pj_sha1_final(pj_sha1_context *ctx,
69
70
76
77
78#endif /* __PJLIB_UTIL_SHA1_H__ */
79
#define PJ_SHA1_DIGEST_SIZE
Definition: sha1.h:46
void pj_sha1_init(pj_sha1_context *ctx)
void pj_sha1_final(pj_sha1_context *ctx, pj_uint8_t digest[20])
void pj_sha1_update(pj_sha1_context *ctx, const pj_uint8_t *data, const pj_size_t nbytes)
unsigned char pj_uint8_t
size_t pj_size_t
unsigned int pj_uint32_t
#define PJ_BEGIN_DECL
#define PJ_END_DECL
Definition: sha1.h:39
pj_uint32_t count[2]
Definition: sha1.h:41
pj_uint8_t buffer[64]
Definition: sha1.h:42
pj_uint32_t state[5]
Definition: sha1.h:40

 


PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library
Copyright (C) 2006-2009 Teluu Inc.