MD5MessageDigest

Computes MD5 digest value of the input message.

Syntax

IppStatus ippsMD5MessageDigest(const Ipp8u *pSrcMesg, int mesgLen, Ipp8u *pMD);

Parameters

pSrcMesg

Pointer to the input message.

mesglen

Message length in octets.

pMD

Pointer to the resultant digest.

Description

This function is declared in the ippcp.h file. The function uses the selected hash algorithm to compute digest value of the entire (non-streaming) input message.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or warning.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is NULL.

ippStsLengthErr

Indicates an error condition if the input data stream length is less than zero.

MD5 Digest of a Message

void MD5_sample(void){
   // define message
   Ipp8u msg[] = "abcdefghijklmnopqrstuvwxyz";
 
   // once the whole message is placed into memory,
   // one can use the integrated primitive
   Ipp8u digest[16];
   ippsMD5MessageDigest(msg, strlen((char*)msg), digest);
}

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.