BLOG
|
DOCUMENTATION
|
GITHUB
|
Home
-->
Documentations
--> PJLIB-UTIL Reference
Users
ming
teluu
pjproject-mac
pjlib-util
include
pjlib-util
hmac_md5.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_HMAC_MD5_H__
20
#define __PJLIB_UTIL_HMAC_MD5_H__
21
31
#include <
pj/types.h
>
32
#include <
pjlib-util/md5.h
>
33
34
PJ_BEGIN_DECL
35
48
typedef
struct
pj_hmac_md5_context
49
{
50
pj_md5_context
context
;
51
pj_uint8_t
k_opad
[64];
52
}
pj_hmac_md5_context
;
53
54
64
PJ_DECL(
void
)
pj_hmac_md5
(
const
pj_uint8_t
*input,
unsigned
input_len,
65
const
pj_uint8_t
*key,
unsigned
key_len,
66
pj_uint8_t
digest[16]);
67
68
76
PJ_DECL(
void
)
pj_hmac_md5_init
(
pj_hmac_md5_context
*hctx,
77
const
pj_uint8_t
*key,
unsigned
key_len);
78
86
PJ_DECL(
void
)
pj_hmac_md5_update
(
pj_hmac_md5_context
*hctx,
87
const
pj_uint8_t
*input,
88
unsigned
input_len);
89
96
PJ_DECL(
void
)
pj_hmac_md5_final
(
pj_hmac_md5_context
*hctx,
97
pj_uint8_t
digest[16]);
98
103
PJ_END_DECL
104
105
106
#endif
/* __PJLIB_UTIL_HMAC_MD5_H__ */
107
108
pj_hmac_md5_init
void pj_hmac_md5_init(pj_hmac_md5_context *hctx, const pj_uint8_t *key, unsigned key_len)
pj_hmac_md5_update
void pj_hmac_md5_update(pj_hmac_md5_context *hctx, const pj_uint8_t *input, unsigned input_len)
pj_hmac_md5
void pj_hmac_md5(const pj_uint8_t *input, unsigned input_len, const pj_uint8_t *key, unsigned key_len, pj_uint8_t digest[16])
pj_hmac_md5_final
void pj_hmac_md5_final(pj_hmac_md5_context *hctx, pj_uint8_t digest[16])
pj_uint8_t
unsigned char pj_uint8_t
PJ_BEGIN_DECL
#define PJ_BEGIN_DECL
PJ_END_DECL
#define PJ_END_DECL
md5.h
MD5 Functions.
pj_hmac_md5_context
Definition:
hmac_md5.h:49
pj_hmac_md5_context::k_opad
pj_uint8_t k_opad[64]
Definition:
hmac_md5.h:51
pj_hmac_md5_context::context
pj_md5_context context
Definition:
hmac_md5.h:50
pj_md5_context
Definition:
md5.h:40
types.h
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.