WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

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

hmac_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_HMAC_SHA1_H__
20#define __PJLIB_UTIL_HMAC_SHA1_H__
21
27#include <pj/types.h>
28#include <pjlib-util/sha1.h>
29
31
45{
49
50
61PJ_DECL(void) pj_hmac_sha1(const pj_uint8_t *input, unsigned input_len,
62 const pj_uint8_t *key, unsigned key_len,
63 pj_uint8_t digest[20]);
64
65
74 const pj_uint8_t *key, unsigned key_len);
75
84 const pj_uint8_t *input,
85 unsigned input_len);
86
94 pj_uint8_t digest[20]);
95
96
102
103
104#endif /* __PJLIB_UTIL_HMAC_SHA1_H__ */
105
106
void pj_hmac_sha1_final(pj_hmac_sha1_context *hctx, pj_uint8_t digest[20])
void pj_hmac_sha1_update(pj_hmac_sha1_context *hctx, const pj_uint8_t *input, unsigned input_len)
void pj_hmac_sha1(const pj_uint8_t *input, unsigned input_len, const pj_uint8_t *key, unsigned key_len, pj_uint8_t digest[20])
void pj_hmac_sha1_init(pj_hmac_sha1_context *hctx, const pj_uint8_t *key, unsigned key_len)
unsigned char pj_uint8_t
#define PJ_BEGIN_DECL
#define PJ_END_DECL
SHA1 encryption implementation.
Definition: hmac_sha1.h:45
pj_uint8_t k_opad[64]
Definition: hmac_sha1.h:47
pj_sha1_context context
Definition: hmac_sha1.h:46
Definition: sha1.h:39

 


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.