SPB Git

spb/os-vault Public

Self-custody, multi-chain crypto wallet for macOS. One recovery phrase, six chain families, zero API keys — nothing leaves your Mac.

Swift 96% Shell 3.4% Makefile 0.6%
277 B · 11 lines swift
Raw Blame History
1import CommonCrypto2import Foundation34public func sha256(data: Data) -> Data {5    var hash = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH))6    data.withUnsafeBytes {7        _ = CC_SHA256($0.baseAddress, CC_LONG(data.count), &hash)8    }9    return Data(hash)10}11