[NXP][Zephyr] Fix deprecated rand32 inclusion (#32531)

* [NXP][Zephyr] Fix deprecated rand32 inclusion

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>

* Restyled by clang-format

* nrfconnect still relies on rand32

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>

---------

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp
index 07f30dc..0b2336e 100644
--- a/src/platform/Zephyr/BLEManagerImpl.cpp
+++ b/src/platform/Zephyr/BLEManagerImpl.cpp
@@ -40,7 +40,11 @@
 #include <zephyr/bluetooth/addr.h>
 #include <zephyr/bluetooth/gatt.h>
 #include <zephyr/bluetooth/hci.h>
+#if CHIP_DEVICE_LAYER_TARGET_NRFCONNECT
 #include <zephyr/random/rand32.h>
+#else
+#include <zephyr/random/random.h>
+#endif
 #include <zephyr/sys/byteorder.h>
 #include <zephyr/sys/util.h>
 
diff --git a/src/platform/nxp/rt/rw61x/BUILD.gn b/src/platform/nxp/rt/rw61x/BUILD.gn
index 5de7855..0631c8c 100644
--- a/src/platform/nxp/rt/rw61x/BUILD.gn
+++ b/src/platform/nxp/rt/rw61x/BUILD.gn
@@ -76,8 +76,8 @@
 
   if (chip_enable_ble) {
     sources += [
-      # Adding rand32 file which defines the function sys_csrand_get which is called by BLEManagerImpl from Zephyr
-      "${nxp_sdk_build_root}/${nxp_sdk_name}/sdk_hook/zephyr/random/rand32.cpp",
+      # Adding random file which defines the function sys_csrand_get which is called by BLEManagerImpl from Zephyr
+      "${nxp_sdk_build_root}/${nxp_sdk_name}/sdk_hook/zephyr/random/random.cpp",
       "../../../Zephyr/BLEAdvertisingArbiter.cpp",
       "../../../Zephyr/BLEManagerImpl.cpp",
       "../../common/ble_zephyr/BLEManagerImpl.h",
diff --git a/third_party/nxp/rt_sdk/sdk_hook/zephyr/random/rand32.cpp b/third_party/nxp/rt_sdk/sdk_hook/zephyr/random/random.cpp
similarity index 92%
rename from third_party/nxp/rt_sdk/sdk_hook/zephyr/random/rand32.cpp
rename to third_party/nxp/rt_sdk/sdk_hook/zephyr/random/random.cpp
index a54301c..d6ea3cd 100644
--- a/third_party/nxp/rt_sdk/sdk_hook/zephyr/random/rand32.cpp
+++ b/third_party/nxp/rt_sdk/sdk_hook/zephyr/random/random.cpp
@@ -6,8 +6,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include "rand32.h"
 #include <crypto/CHIPCryptoPAL.h>
+#include <zephyr/random/random.h>
 
 /**
  * Fill the buffer given as an arg with random values
diff --git a/third_party/nxp/rt_sdk/sdk_hook/zephyr/random/rand32.h b/third_party/nxp/rt_sdk/sdk_hook/zephyr/random/random.h
similarity index 100%
rename from third_party/nxp/rt_sdk/sdk_hook/zephyr/random/rand32.h
rename to third_party/nxp/rt_sdk/sdk_hook/zephyr/random/random.h