BLOG | DOCUMENTATION | TRAC

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

Data Structures

struct  pj_sha1_context
 

Macros

#define PJ_SHA1_DIGEST_SIZE   20
 

Functions

void pj_sha1_init (pj_sha1_context *ctx)
 
void pj_sha1_update (pj_sha1_context *ctx, const pj_uint8_t *data, const pj_size_t nbytes)
 
void pj_sha1_final (pj_sha1_context *ctx, pj_uint8_t digest[20])
 

Detailed Description

Macro Definition Documentation

#define PJ_SHA1_DIGEST_SIZE   20

SHA1 digest size is 20 bytes

Function Documentation

void pj_sha1_final ( pj_sha1_context ctx,
pj_uint8_t  digest[20] 
)

Finish the message and return the digest.

Parameters
ctxSHA1 context.
digest16 byte digest.
void pj_sha1_init ( pj_sha1_context ctx)

Initialize the algorithm.

Parameters
ctxSHA1 context.
void pj_sha1_update ( pj_sha1_context ctx,
const pj_uint8_t data,
const pj_size_t  nbytes 
)

Append a stream to the message.

Parameters
ctxSHA1 context.
dataData.
nbytesLength of data.

 


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.