2015-02-10 21:09:55 -05:00
|
|
|
#define COMMON_DIGEST_FOR_OPENSSL 1
|
|
|
|
#include <CommonCrypto/CommonDigest.h>
|
|
|
|
|
2019-10-12 05:47:06 -04:00
|
|
|
#ifdef __clang__
|
|
|
|
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
/* Suppress deprecation warnings of MD5 from Xcode 11.1 */
|
|
|
|
/* Although we know MD5 is deprecated too, provide just for backward
|
|
|
|
* compatibility, as well as Apple does. */
|
|
|
|
#endif
|
|
|
|
|
2015-02-10 21:09:55 -05:00
|
|
|
#define MD5_BLOCK_LENGTH CC_MD5_BLOCK_BYTES
|
|
|
|
|
2016-06-28 05:42:29 -04:00
|
|
|
static DEFINE_UPDATE_FUNC_FOR_UINT(MD5)
|
|
|
|
static DEFINE_FINISH_FUNC_FROM_FINAL(MD5)
|
2015-02-10 21:09:55 -05:00
|
|
|
|
|
|
|
#undef MD5_Update
|
|
|
|
#undef MD5_Finish
|
|
|
|
#define MD5_Update rb_digest_MD5_update
|
|
|
|
#define MD5_Finish rb_digest_MD5_finish
|