26 lines
667 B
C
26 lines
667 B
C
#ifndef MARS_NWSSL_OPENSSL_MD5_H
|
|
#define MARS_NWSSL_OPENSSL_MD5_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <crypto/cryptoApi.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef psMd5_t MD5_CTX;
|
|
#define MD5Init MD5_Init
|
|
#define MD5Update MD5_Update
|
|
#define MD5Final MD5_Final
|
|
|
|
static inline int MD5_Init(MD5_CTX *c) { return psMd5Init(c) >= 0 ? 1 : 0; }
|
|
static inline int MD5_Update(MD5_CTX *c, const void *data, size_t len) { psMd5Update(c, (const unsigned char *)data, (uint32_t)len); return 1; }
|
|
static inline int MD5_Final(unsigned char *md, MD5_CTX *c) { psMd5Final(c, md); return 1; }
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* MARS_NWSSL_OPENSSL_MD5_H */
|