Compare commits

...

1 Commits

Author SHA1 Message Date
387d1f501b Replace deprecated Data.withUnsafeMutableBytes call 2023-01-02 00:06:52 -05:00

View File

@@ -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
}