From 387d1f501bc11c3d571614cc477e9928c9e6ad0c Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Mon, 2 Jan 2023 00:06:52 -0500 Subject: [PATCH] Replace deprecated Data.withUnsafeMutableBytes call --- damus/Nostr/NostrEvent.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/damus/Nostr/NostrEvent.swift b/damus/Nostr/NostrEvent.swift index 739f7578..39af4ba7 100644 --- a/damus/Nostr/NostrEvent.swift +++ b/damus/Nostr/NostrEvent.swift @@ -448,7 +448,7 @@ func hex_encode(_ data: Data) -> String { func random_bytes(count: Int) -> Data { var data = Data(count: count) _ = data.withUnsafeMutableBytes { mutableBytes in - SecRandomCopyBytes(kSecRandomDefault, count, mutableBytes) + SecRandomCopyBytes(kSecRandomDefault, count, mutableBytes.baseAddress!) } return data }