LibreOffice
LibreOffice 5.3 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Typedefs | Enumerations | Functions
digest.h File Reference
#include <sal/config.h>
#include <sal/saldllapi.h>
#include <sal/types.h>

Go to the source code of this file.

Macros

#define RTL_DIGEST_LENGTH_MD2   16
 
#define RTL_DIGEST_LENGTH_MD5   16
 
#define RTL_DIGEST_LENGTH_SHA   20
 
#define RTL_DIGEST_LENGTH_SHA1   20
 
#define RTL_DIGEST_LENGTH_HMAC_MD5   RTL_DIGEST_LENGTH_MD5
 
#define RTL_DIGEST_LENGTH_HMAC_SHA1   RTL_DIGEST_LENGTH_SHA1
 

Typedefs

typedef void * rtlDigest
 Digest Handle opaque type. More...
 
typedef enum __rtl_DigestAlgorithm rtlDigestAlgorithm
 Digest Algorithm type. More...
 
typedef enum __rtl_DigestError rtlDigestError
 Error Code type. More...
 

Enumerations

enum  __rtl_DigestAlgorithm {
  rtl_Digest_AlgorithmMD2, rtl_Digest_AlgorithmMD5, rtl_Digest_AlgorithmSHA, rtl_Digest_AlgorithmSHA1,
  rtl_Digest_AlgorithmHMAC_MD5, rtl_Digest_AlgorithmHMAC_SHA1, rtl_Digest_AlgorithmInvalid, rtl_Digest_Algorithm_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
}
 Digest Algorithm enumeration. More...
 
enum  __rtl_DigestError {
  rtl_Digest_E_None, rtl_Digest_E_Argument, rtl_Digest_E_Algorithm, rtl_Digest_E_BufferSize,
  rtl_Digest_E_Memory, rtl_Digest_E_Unknown, rtl_Digest_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
}
 Error Code enumeration. More...
 

Functions

SAL_DLLPUBLIC rtlDigest rtl_digest_create (rtlDigestAlgorithm Algorithm) SAL_THROW_EXTERN_C()
 Create a digest handle for the given algorithm. More...
 
SAL_DLLPUBLIC void rtl_digest_destroy (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Destroy a digest handle. More...
 
SAL_DLLPUBLIC rtlDigestAlgorithm rtl_digest_queryAlgorithm (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Query the algorithm of a given digest. More...
 
SAL_DLLPUBLIC sal_uInt32 rtl_digest_queryLength (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Query the length of a given digest. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_init (rtlDigest Digest, const sal_uInt8 *pData, sal_uInt32 nDatLen) SAL_THROW_EXTERN_C()
 Initialize a digest with given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_update (rtlDigest Digest, const void *pData, sal_uInt32 nDatLen) SAL_THROW_EXTERN_C()
 Update a digest with given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_get (rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Finalize a digest and retrieve the digest value. More...
 
SAL_DLLPUBLIC rtlDigest rtl_digest_createMD2 (void) SAL_THROW_EXTERN_C()
 Create a MD2 digest handle. More...
 
SAL_DLLPUBLIC void rtl_digest_destroyMD2 (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Destroy a MD2 digest handle. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateMD2 (rtlDigest Digest, const void *pData, sal_uInt32 nDatLen) SAL_THROW_EXTERN_C()
 Update a MD2 digest with given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_getMD2 (rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Finalize a MD2 digest and retrieve the digest value. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_MD2 (const void *pData, sal_uInt32 nDatLen, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Evaluate a MD2 digest value from given data. More...
 
SAL_DLLPUBLIC rtlDigest rtl_digest_createMD5 (void) SAL_THROW_EXTERN_C()
 Create a MD5 digest handle. More...
 
SAL_DLLPUBLIC void rtl_digest_destroyMD5 (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Destroy a MD5 digest handle. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateMD5 (rtlDigest Digest, const void *pData, sal_uInt32 nDatLen) SAL_THROW_EXTERN_C()
 Update a MD5 digest with given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_getMD5 (rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Finalize a MD5 digest and retrieve the digest value. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_rawMD5 (rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Retrieve the raw (not finalized) MD5 digest value. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_MD5 (const void *pData, sal_uInt32 nDatLen, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Evaluate a MD5 digest value from given data. More...
 
SAL_DLLPUBLIC rtlDigest rtl_digest_createSHA (void) SAL_THROW_EXTERN_C()
 Create a SHA digest handle. More...
 
SAL_DLLPUBLIC void rtl_digest_destroySHA (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Destroy a SHA digest handle. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateSHA (rtlDigest Digest, const void *pData, sal_uInt32 nDatLen) SAL_THROW_EXTERN_C()
 Update a SHA digest with given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_getSHA (rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Finalize a SHA digest and retrieve the digest value. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_SHA (const void *pData, sal_uInt32 nDatLen, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Evaluate a SHA digest value from given data. More...
 
SAL_DLLPUBLIC rtlDigest rtl_digest_createSHA1 (void) SAL_THROW_EXTERN_C()
 Create a SHA1 digest handle. More...
 
SAL_DLLPUBLIC void rtl_digest_destroySHA1 (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Destroy a SHA1 digest handle. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateSHA1 (rtlDigest Digest, const void *pData, sal_uInt32 nDatLen) SAL_THROW_EXTERN_C()
 Update a SHA1 digest with given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_getSHA1 (rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Finalize a SHA1 digest and retrieve the digest value. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_SHA1 (const void *pData, sal_uInt32 nDatLen, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Evaluate a SHA1 digest value from given data. More...
 
SAL_DLLPUBLIC rtlDigest rtl_digest_createHMAC_MD5 (void) SAL_THROW_EXTERN_C()
 Create a HMAC_MD5 digest handle. More...
 
SAL_DLLPUBLIC void rtl_digest_destroyHMAC_MD5 (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Destroy a HMAC_MD5 digest handle. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_initHMAC_MD5 (rtlDigest Digest, const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen) SAL_THROW_EXTERN_C()
 Initialize a HMAC_MD5 digest. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateHMAC_MD5 (rtlDigest Digest, const void *pData, sal_uInt32 nDatLen) SAL_THROW_EXTERN_C()
 Update a HMAC_MD5 digest with given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_getHMAC_MD5 (rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Finalize a HMAC_MD5 digest and retrieve the digest value. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_HMAC_MD5 (const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, const void *pData, sal_uInt32 nDatLen, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Evaluate a HMAC_MD5 digest value from given data. More...
 
SAL_DLLPUBLIC rtlDigest rtl_digest_createHMAC_SHA1 (void) SAL_THROW_EXTERN_C()
 Create a HMAC_SHA1 digest handle. More...
 
SAL_DLLPUBLIC void rtl_digest_destroyHMAC_SHA1 (rtlDigest Digest) SAL_THROW_EXTERN_C()
 Destroy a HMAC_SHA1 digest handle. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_initHMAC_SHA1 (rtlDigest Digest, const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen) SAL_THROW_EXTERN_C()
 Initialize a HMAC_SHA1 digest. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateHMAC_SHA1 (rtlDigest Digest, const void *pData, sal_uInt32 nDatLen) SAL_THROW_EXTERN_C()
 Update a HMAC_SHA1 digest with given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_getHMAC_SHA1 (rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Finalize a HMAC_SHA1 digest and retrieve the digest value. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_HMAC_SHA1 (const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, const void *pData, sal_uInt32 nDatLen, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) SAL_THROW_EXTERN_C()
 Evaluate a HMAC_SHA1 digest value from given data. More...
 
SAL_DLLPUBLIC rtlDigestError rtl_digest_PBKDF2 (sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, const sal_uInt8 *pPassData, sal_uInt32 nPassLen, const sal_uInt8 *pSaltData, sal_uInt32 nSaltLen, sal_uInt32 nCount) SAL_THROW_EXTERN_C()
 Password-Based Key Derivation Function. More...
 

Macro Definition Documentation

#define RTL_DIGEST_LENGTH_HMAC_MD5   RTL_DIGEST_LENGTH_MD5
#define RTL_DIGEST_LENGTH_HMAC_SHA1   RTL_DIGEST_LENGTH_SHA1
#define RTL_DIGEST_LENGTH_MD2   16
#define RTL_DIGEST_LENGTH_MD5   16
#define RTL_DIGEST_LENGTH_SHA   20
#define RTL_DIGEST_LENGTH_SHA1   20

Typedef Documentation

typedef void* rtlDigest

Digest Handle opaque type.

Digest Algorithm type.

Error Code type.

Enumeration Type Documentation

Digest Algorithm enumeration.

See Also
rtl_digest_create()
Enumerator
rtl_Digest_AlgorithmMD2 
rtl_Digest_AlgorithmMD5 
rtl_Digest_AlgorithmSHA 
rtl_Digest_AlgorithmSHA1 
rtl_Digest_AlgorithmHMAC_MD5 
rtl_Digest_AlgorithmHMAC_SHA1 
rtl_Digest_AlgorithmInvalid 
rtl_Digest_Algorithm_FORCE_EQUAL_SIZE 

Error Code enumeration.

Enumerator
rtl_Digest_E_None 
rtl_Digest_E_Argument 
rtl_Digest_E_Algorithm 
rtl_Digest_E_BufferSize 
rtl_Digest_E_Memory 
rtl_Digest_E_Unknown 
rtl_Digest_E_FORCE_EQUAL_SIZE 

Function Documentation

SAL_DLLPUBLIC rtlDigest rtl_digest_create ( rtlDigestAlgorithm  Algorithm)

Create a digest handle for the given algorithm.

See Also
rtlDigestAlgorithm
Parameters
Algorithm[in] digest algorithm.
Returns
Digest handle, or 0 upon failure.
SAL_DLLPUBLIC rtlDigest rtl_digest_createHMAC_MD5 ( void  )

Create a HMAC_MD5 digest handle.

The HMAC_MD5 digest algorithm is specified in

RFC 2104 (Informational) HMAC: Keyed-Hashing for Message Authentication

See Also
rtl_digest_create()
SAL_DLLPUBLIC rtlDigest rtl_digest_createHMAC_SHA1 ( void  )

Create a HMAC_SHA1 digest handle.

The HMAC_SHA1 digest algorithm is specified in RFC 2104 (Informational) HMAC: Keyed-Hashing for Message Authentication RFC 2898 (Informational) PKCS #5: Password-Based Cryptography Specification Version 2.0

See Also
rtl_digest_create()
SAL_DLLPUBLIC rtlDigest rtl_digest_createMD2 ( void  )

Create a MD2 digest handle.

The MD2 digest algorithm is specified in RFC 1319 (Informational) The MD2 Message-Digest Algorithm

See Also
rtl_digest_create()
SAL_DLLPUBLIC rtlDigest rtl_digest_createMD5 ( void  )

Create a MD5 digest handle.

The MD5 digest algorithm is specified in RFC 1321 (Informational) The MD5 Message-Digest Algorithm

See Also
rtl_digest_create()
SAL_DLLPUBLIC rtlDigest rtl_digest_createSHA ( void  )

Create a SHA digest handle.

The SHA digest algorithm is specified in FIPS PUB 180 (Superseded by FIPS PUB 180-1) Secure Hash Standard

See Also
rtl_digest_create()
SAL_DLLPUBLIC rtlDigest rtl_digest_createSHA1 ( void  )

Create a SHA1 digest handle.

The SHA1 digest algorithm is specified in FIPS PUB 180-1 (Supersedes FIPS PUB 180) Secure Hash Standard

See Also
rtl_digest_create()
SAL_DLLPUBLIC void rtl_digest_destroy ( rtlDigest  Digest)

Destroy a digest handle.

Postcondition
Digest handle destroyed and invalid.
Parameters
Digest[in] digest handle to be destroyed.
Returns
None.
SAL_DLLPUBLIC void rtl_digest_destroyHMAC_MD5 ( rtlDigest  Digest)

Destroy a HMAC_MD5 digest handle.

See Also
rtl_digest_destroy()
SAL_DLLPUBLIC void rtl_digest_destroyHMAC_SHA1 ( rtlDigest  Digest)

Destroy a HMAC_SHA1 digest handle.

See Also
rtl_digest_destroy()
SAL_DLLPUBLIC void rtl_digest_destroyMD2 ( rtlDigest  Digest)

Destroy a MD2 digest handle.

See Also
rtl_digest_destroy()
SAL_DLLPUBLIC void rtl_digest_destroyMD5 ( rtlDigest  Digest)

Destroy a MD5 digest handle.

See Also
rtl_digest_destroy()
SAL_DLLPUBLIC void rtl_digest_destroySHA ( rtlDigest  Digest)

Destroy a SHA digest handle.

See Also
rtl_digest_destroy()
SAL_DLLPUBLIC void rtl_digest_destroySHA1 ( rtlDigest  Digest)

Destroy a SHA1 digest handle.

See Also
rtl_digest_destroy()
SAL_DLLPUBLIC rtlDigestError rtl_digest_get ( rtlDigest  Digest,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Finalize a digest and retrieve the digest value.

Precondition
Digest value length must not be less than digest length.
Postcondition
Digest initialized to accept another update sequence.
See Also
rtl_digest_queryLength()
rtl_digest_update()
Parameters
Digest[in] digest handle.
pBuffer[in] digest value buffer.
nBufLen[in] digest value length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_getHMAC_MD5 ( rtlDigest  Digest,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Finalize a HMAC_MD5 digest and retrieve the digest value.

See Also
rtl_digest_get()
SAL_DLLPUBLIC rtlDigestError rtl_digest_getHMAC_SHA1 ( rtlDigest  Digest,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Finalize a HMAC_SHA1 digest and retrieve the digest value.

See Also
rtl_digest_get()
SAL_DLLPUBLIC rtlDigestError rtl_digest_getMD2 ( rtlDigest  Digest,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Finalize a MD2 digest and retrieve the digest value.

See Also
rtl_digest_get()
SAL_DLLPUBLIC rtlDigestError rtl_digest_getMD5 ( rtlDigest  Digest,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Finalize a MD5 digest and retrieve the digest value.

See Also
rtl_digest_get()
SAL_DLLPUBLIC rtlDigestError rtl_digest_getSHA ( rtlDigest  Digest,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Finalize a SHA digest and retrieve the digest value.

See Also
rtl_digest_get()
SAL_DLLPUBLIC rtlDigestError rtl_digest_getSHA1 ( rtlDigest  Digest,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Finalize a SHA1 digest and retrieve the digest value.

See Also
rtl_digest_get()
SAL_DLLPUBLIC rtlDigestError rtl_digest_HMAC_MD5 ( const sal_uInt8 pKeyData,
sal_uInt32  nKeyLen,
const void *  pData,
sal_uInt32  nDatLen,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Evaluate a HMAC_MD5 digest value from given data.

This function performs an optimized call sequence on a single data buffer, avoiding digest creation and destruction.

See Also
rtl_digest_initHMAC_MD5()
rtl_digest_updateHMAC_MD5()
rtl_digest_getHMAC_MD5()
Parameters
pKeyData[in] key material buffer.
nKeyLen[in] key material length.
pData[in] data buffer.
nDatLen[in] data length.
pBuffer[in] digest value buffer.
nBufLen[in] digest value length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_HMAC_SHA1 ( const sal_uInt8 pKeyData,
sal_uInt32  nKeyLen,
const void *  pData,
sal_uInt32  nDatLen,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Evaluate a HMAC_SHA1 digest value from given data.

This function performs an optimized call sequence on a single data buffer, avoiding digest creation and destruction.

See Also
rtl_digest_initHMAC_SHA1()
rtl_digest_updateHMAC_SHA1()
rtl_digest_getHMAC_SHA1()
Parameters
pKeyData[in] key material buffer.
nKeyLen[in] key material length.
pData[in] data buffer.
nDatLen[in] data length.
pBuffer[in] digest value buffer.
nBufLen[in] digest value length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_init ( rtlDigest  Digest,
const sal_uInt8 pData,
sal_uInt32  nDatLen 
)

Initialize a digest with given data.

Parameters
Digest[in] digest handle.
pData[in] data buffer.
nDatLen[in] data length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_initHMAC_MD5 ( rtlDigest  Digest,
const sal_uInt8 pKeyData,
sal_uInt32  nKeyLen 
)

Initialize a HMAC_MD5 digest.

See Also
rtl_digest_init()
Parameters
Digest[in] digest handle.
pKeyData[in] key material buffer.
nKeyLen[in] key material length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_initHMAC_SHA1 ( rtlDigest  Digest,
const sal_uInt8 pKeyData,
sal_uInt32  nKeyLen 
)

Initialize a HMAC_SHA1 digest.

See Also
rtl_digest_init()
Parameters
Digest[in] digest handle.
pKeyData[in] key material buffer.
nKeyLen[in] key material length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_MD2 ( const void *  pData,
sal_uInt32  nDatLen,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Evaluate a MD2 digest value from given data.

This function performs an optimized call sequence on a single data buffer, avoiding digest creation and destruction.

See Also
rtl_digest_updateMD2()
rtl_digest_getMD2()
Parameters
pData[in] data buffer.
nDatLen[in] data length.
pBuffer[in] digest value buffer.
nBufLen[in] digest value length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_MD5 ( const void *  pData,
sal_uInt32  nDatLen,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Evaluate a MD5 digest value from given data.

This function performs an optimized call sequence on a single data buffer, avoiding digest creation and destruction.

See Also
rtl_digest_updateMD5()
rtl_digest_getMD5()
Parameters
pData[in] data buffer.
nDatLen[in] data length.
pBuffer[in] digest value buffer.
nBufLen[in] digest value length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_PBKDF2 ( sal_uInt8 pKeyData,
sal_uInt32  nKeyLen,
const sal_uInt8 pPassData,
sal_uInt32  nPassLen,
const sal_uInt8 pSaltData,
sal_uInt32  nSaltLen,
sal_uInt32  nCount 
)

Password-Based Key Derivation Function.

The PBKDF2 key derivation function is specified in RFC 2898 (Informational) PKCS #5: Password-Based Cryptography Specification Version 2.0

Parameters
pKeyData[out] derived key
nKeyLen[in] derived key length
pPassData[in] password
nPassLen[in] password length
pSaltData[in] salt
nSaltLen[in] salt length
nCount[in] iteration count
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestAlgorithm rtl_digest_queryAlgorithm ( rtlDigest  Digest)

Query the algorithm of a given digest.

Parameters
Digest[in] digest handle.
Returns
digest algorithm, or rtl_Digest_AlgorithmInvalid upon failure.
SAL_DLLPUBLIC sal_uInt32 rtl_digest_queryLength ( rtlDigest  Digest)

Query the length of a given digest.

Parameters
Digest[in] digest handle.
Returns
digest length, or 0 upon failure.
SAL_DLLPUBLIC rtlDigestError rtl_digest_rawMD5 ( rtlDigest  Digest,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Retrieve the raw (not finalized) MD5 digest value.

This function is a non-standard replacement for rtl_digest_getMD5() and must be used with caution.

Postcondition
Digest initialized to accept another update sequence.
See Also
rtl_digest_get()
SAL_DLLPUBLIC rtlDigestError rtl_digest_SHA ( const void *  pData,
sal_uInt32  nDatLen,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Evaluate a SHA digest value from given data.

This function performs an optimized call sequence on a single data buffer, avoiding digest creation and destruction.

See Also
rtl_digest_updateSHA()
rtl_digest_getSHA()
Parameters
pData[in] data buffer.
nDatLen[in] data length.
pBuffer[in] digest value buffer.
nBufLen[in] digest value length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_SHA1 ( const void *  pData,
sal_uInt32  nDatLen,
sal_uInt8 pBuffer,
sal_uInt32  nBufLen 
)

Evaluate a SHA1 digest value from given data.

This function performs an optimized call sequence on a single data buffer, avoiding digest creation and destruction.

See Also
rtl_digest_updateSHA1()
rtl_digest_getSHA1()
Parameters
pData[in] data buffer.
nDatLen[in] data length.
pBuffer[in] digest value buffer.
nBufLen[in] digest value length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_update ( rtlDigest  Digest,
const void *  pData,
sal_uInt32  nDatLen 
)

Update a digest with given data.

Parameters
Digest[in] digest handle.
pData[in] data buffer.
nDatLen[in] data length.
Returns
rtl_Digest_E_None upon success.
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateHMAC_MD5 ( rtlDigest  Digest,
const void *  pData,
sal_uInt32  nDatLen 
)

Update a HMAC_MD5 digest with given data.

See Also
rtl_digest_update()
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateHMAC_SHA1 ( rtlDigest  Digest,
const void *  pData,
sal_uInt32  nDatLen 
)

Update a HMAC_SHA1 digest with given data.

See Also
rtl_digest_update()
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateMD2 ( rtlDigest  Digest,
const void *  pData,
sal_uInt32  nDatLen 
)

Update a MD2 digest with given data.

See Also
rtl_digest_update()
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateMD5 ( rtlDigest  Digest,
const void *  pData,
sal_uInt32  nDatLen 
)

Update a MD5 digest with given data.

See Also
rtl_digest_update()
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateSHA ( rtlDigest  Digest,
const void *  pData,
sal_uInt32  nDatLen 
)

Update a SHA digest with given data.

See Also
rtl_digest_update()
SAL_DLLPUBLIC rtlDigestError rtl_digest_updateSHA1 ( rtlDigest  Digest,
const void *  pData,
sal_uInt32  nDatLen 
)

Update a SHA1 digest with given data.

See Also
rtl_digest_update()