eyBuildLib API Reference : eyBuildLib

md5c

NAME

md5c - MD5 message-digest algorithm

ROUTINES

MD5Init( ) - initializes an MD5 message digest context
MD5Update( ) - updates the MD5 context by using the supplied buffer
MD5Final( ) - calculate the MD5 digest for src, output with hex format
MD5String( ) - calculate the MD5 digest for src
MD5Hex( ) - calculate the MD5 digest for src, output with hex format

DESCRIPTION

MD5 message-digest algorithm operation library base on RSA.

INCLUDE

ebmd5.h


eyBuildLib : Routines

MD5Init( )

NAME

MD5Init( ) - initializes an MD5 message digest context

SYNOPSIS

void MD5Init
    (
    MD5_CTX * context
    )

DESCRIPTION

this routine is to initializes an MD5 message digest context. The context must be initialized for any new MD5 message digest. After calling MD5Init, call the MD5Update function to perform the message digest operations. When you have completed the message digest operations, call the MD5Final function to retrieve the hash.

RETURNS

NONE

SEE ALSO

md5c


eyBuildLib : Routines

MD5Update( )

NAME

MD5Update( ) - updates the MD5 context by using the supplied buffer

SYNOPSIS

void MD5Update
    (
    MD5_CTX *       context,
    unsigned char * input,
    unsigned int    len
    )

DESCRIPTION

this routine is to updates the MD5 context by using the supplied buffer for the message whose MD5 digest is being generated. This function is called for each buffer of the message being hashed.

RETURNS

NONE

SEE ALSO

md5c


eyBuildLib : Routines

MD5Final( )

NAME

MD5Final( ) - calculate the MD5 digest for src, output with hex format

SYNOPSIS

void MD5Final
    (
    unsigned char digest[16],
    MD5_CTX *     context
    )

DESCRIPTION

this routine is to ends an MD5 message digest previously started by a call to the MD5Init function. Prior to calling MD5Final, use the MD5Update function to update the MD5 message digest context with each buffer in the message being hashed.

RETURNS

NONE

SEE ALSO

md5c


eyBuildLib : Routines

MD5String( )

NAME

MD5String( ) - calculate the MD5 digest for src

SYNOPSIS

char * MD5String
    (
    char *       dst,         /* where store to */
    const char * src,         /* to take digest of */
    unsigned int len          /* source length */
    )

DESCRIPTION

this routine calculate the MD5 digest for "src" with the length "len", and store the result into "dst" buffer. The size of dst buffer should be at least 16 bytes.

RETURNS

pointer to dst buffer

SEE ALSO

md5c


eyBuildLib : Routines

MD5Hex( )

NAME

MD5Hex( ) - calculate the MD5 digest for src, output with hex format

SYNOPSIS

char * MD5Hex
    (
    char *       dst,         /* where store to */
    const char * src,         /* to take digest of */
    unsigned int len          /* source length */
    )

DESCRIPTION

this routine calculate the MD5 digest and output with hex format (capital) for "src" with the length "len", store the result into "dst" buffer. The size of dst buffer should be at least 33 bytes (1byte for tail \0).

RETURNS

pointer to dst buffer

SEE ALSO

md5c