What is the correct way to re-write this code:
randomIV = Data(count: 16)
let result = randomIV.withUnsafeMutableBytes {
SecRandomCopyBytes(kSecRandomDefault, 16, $0)
}
To remove this warning:
'withUnsafeMutableBytes' is deprecated: use withUnsafeMutableBytes(_: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R` instead