Manual Pages for UNIX Darwin command on man HMAC_Init
MyWebUniversity

Manual Pages for UNIX Darwin command on man HMAC_Init

hmac(3) OpenSSL hmac(3)

NAME

HMAC, HMACInit, HMACUpdate, HMACFinal, HMACcleanup - HMAC message

authentication code

SYNOPSIS

#include

unsigned char *HMAC(const EVPMD *evpmd, const void *key, int keylen, const unsigned char *d, int n, unsigned char *md, unsigned int *mdlen); void HMACCTXinit(HMACCTX *ctx); void HMACInit(HMACCTX *ctx, const void *key, int keylen, const EVPMD *md); void HMACInitex(HMACCTX *ctx, const void *key, int keylen, const EVPMD *md, ENGINE *impl); void HMACUpdate(HMACCTX *ctx, const unsigned char *data, int len); void HMACFinal(HMACCTX *ctx, unsigned char *md, unsigned int *len); void HMACCTXcleanup(HMACCTX *ctx); void HMACcleanup(HMACCTX *ctx);

DESCRIPTION

HMAC is a MAC (message authentication code), i.e. a keyed hash function used for message authentication, which is based on a hash function. HMAC() computes the message authentication code of the nn bytes at dd using the hash function eevvppmmdd and the key kkeeyy which is kkeeyylleenn bytes long. It places the result in mmdd (which must have space for the output of the hash function, which is no more than EEVVPPMMAAXXMMDDSSIIZZEE bytes). If mmdd is NULL, the digest is placed in a static array. The size of the output is placed in mmddlleenn, unless it is NNUULLLL. eevvppmmdd can be EVPsha1(), EVPripemd160() etc. kkeeyy and eevvppmmdd may be NNUULLLL if a key and hash function have been set in a previous call to HMACInit() for that HHMMAACCCCTTXX. HMACCTXinit() initialises a HHMMAACCCCTTXX before first use. It must be called. HMACCTXcleanup() erases the key and other data from the HHMMAACCCCTTXX and releases any associated resources. It must be called when an HHMMAACCCCTTXX is no longer required. HMACcleanup() is an alias for HMACCTXcleanup() included for back compatibility with 0.9.6b, it is deprecated. The following functions may be used if the message is not completely stored in memory: HMACInit() initializes a HHMMAACCCCTTXX structure to use the hash function eevvppmmdd and the key kkeeyy which is kkeeyylleenn bytes long. It is deprecated and only included for backward compatibility with OpenSSL 0.9.6b. HMACInitex() initializes or reuses a HHMMAACCCCTTXX structure to use the function eevvppmmdd and key kkeeyy. Either can be NULL, in which case the existing one will be reused. HMACCTXinit() must have been called before the first use of an HHMMAACCCCTTXX in this function. NN..BB.. HHMMAACCIInniitt(())

hhaadd tthhiiss uunnddooccuummeenntteedd bbeehhaavviioouurr iinn pprreevviioouuss vveerrssiioonnss ooff OOppeennSSSSLL -

ffaaiilluurree ttoo sswwiittcchh ttoo HHMMAACCIInniitteexx(()) iinn pprrooggrraammss tthhaatt eexxppeecctt iitt wwiillll ccaauussee tthheemm ttoo ssttoopp wwoorrkkiinngg. HMACUpdate() can be called repeatedly with chunks of the message to be authenticated (lleenn bytes at ddaattaa). HMACFinal() places the message authentication code in mmdd, which must have space for the hash function output.

RETURN VALUES

HMAC() returns a pointer to the message authentication code. HMACCTXinit(), HMACInitex(), HMACUpdate(), HMACFinal() and HMACCTXcleanup() do not return values. CCOONNFFOORRMMIINNGG TTOO RFC 2104

SEE ALSO

sha(3), evp(3) HISTORY HMAC(), HMACInit(), HMACUpdate(), HMACFinal() and HMACcleanup() are available since SSLeay 0.9.0. HMACCTXinit(), HMACInitex() and HMACCTXcleanup() are available since OpenSSL 0.9.7.

0.9.7l 2006-01-30 hmac(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™