From d7d5535fe1ff13b92a63f00f74328f6a98fa799e Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 5 Nov 2024 02:48:49 -0800 Subject: [PATCH] Suppres CC_MD5 warning (#47378) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47378 The RCTMD5Hash in RCTUtils is using CC_MD5 function which is deprecated. unfortunately we can't really change it or we will break many apps that use it in the AsyncStorage. Those app wlll have to do a migration to use a different function. Meanwhile we are suppressing the warning ## Changelog [Internal] - Suppress CC_MD5 warning Reviewed By: cortinico Differential Revision: D65424309 fbshipit-source-id: e0258ae68482f6c4a3a865bb52920f87bc5ada21 --- packages/react-native/React/Base/RCTUtils.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-native/React/Base/RCTUtils.m b/packages/react-native/React/Base/RCTUtils.m index 22b55692471..d95a4ba9426 100644 --- a/packages/react-native/React/Base/RCTUtils.m +++ b/packages/react-native/React/Base/RCTUtils.m @@ -239,7 +239,10 @@ NSString *RCTMD5Hash(NSString *string) { const char *str = string.UTF8String; unsigned char result[CC_MD5_DIGEST_LENGTH]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" CC_MD5(str, (CC_LONG)strlen(str), result); +#pragma clang diagnostic pop return [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", result[0],