mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-05-31 00:00:10 +08:00
Ignore deprecation warning for CC_MD5 on iOS 13+ and macOS 10.15+
Fixes #427
This commit is contained in:
@@ -302,7 +302,10 @@ NSString* GCDWebServerComputeMD5Digest(NSString* format, ...) {
|
|||||||
const char* string = [[[NSString alloc] initWithFormat:format arguments:arguments] UTF8String];
|
const char* string = [[[NSString alloc] initWithFormat:format arguments:arguments] UTF8String];
|
||||||
va_end(arguments);
|
va_end(arguments);
|
||||||
unsigned char md5[CC_MD5_DIGEST_LENGTH];
|
unsigned char md5[CC_MD5_DIGEST_LENGTH];
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
CC_MD5(string, (CC_LONG)strlen(string), md5);
|
CC_MD5(string, (CC_LONG)strlen(string), md5);
|
||||||
|
#pragma clang diagnostic pop
|
||||||
char buffer[2 * CC_MD5_DIGEST_LENGTH + 1];
|
char buffer[2 * CC_MD5_DIGEST_LENGTH + 1];
|
||||||
for (int i = 0; i < CC_MD5_DIGEST_LENGTH; ++i) {
|
for (int i = 0; i < CC_MD5_DIGEST_LENGTH; ++i) {
|
||||||
unsigned char byte = md5[i];
|
unsigned char byte = md5[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user