The digestStart(), digestContinue(), and digestEnd() methods comprise a streaming digest interface.
A streaming interface allows the caller to add blocks of data one at a time and does not require all the entire message be contained in a single buffer in order to generate a digest. The digestContinue() method can be called multiple times, one for each block of data to be included in the digest while the digestStart() and digestEnd() are only called once.
Even after all data to be included in a digest has been input via the digestContinue() method the final digest over all the given data is returned by this method.
- Parameters
-
pDigest | [ in ] Specifies where to place the digest. |
pDigestSize | [ in ] Size in bytes of the pOutData array. [ out ] Specifies the number of bytes written into pOutData. |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | A successful call to initialize was not made before this call. |
P6R::eInvalidArg | One of the parameters is NULL. |
P6R::eInvalidState | A successful call to digestStart() must be done before a call to this method. |
P6R::eFailAndException | The digest calculation failed. Exception record provides detailed error info. |
P6R::eTooSmall | The pDigest buffer is too small to hold the digest result. |