Skip to content

Commit 9ac7914

Browse files
committed
fix: Restore sha256Hash extension for ImageCache
The sha256Hash() extension was accidentally removed when deleting Data+InviteCrypto.swift, but ImageCache depends on it.
1 parent 8c5ddee commit 9ac7914

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)