We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c5ddee commit 9ac7914Copy full SHA for 9ac7914
1 file changed
ConvosCore/Sources/ConvosCore/Shared/Data+Crypto.swift
@@ -0,0 +1,10 @@
1
+import CryptoKit
2
+import Foundation
3
+
4
+extension Data {
5
+ /// Computes SHA256 hash of this data
6
+ func sha256Hash() -> Data {
7
+ let hash = SHA256.hash(data: self)
8
+ return Data(hash)
9
+ }
10
+}
0 commit comments