Files
pruefwerk/fixtures/nightly/mobile/react-native/ios/PumpApp/Checksum.swift
T
sharang a9ca31d60c
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
CI / Deploy Agent (push) Successful in 9m28s
feat(sast): Android and iOS app analysis with mobsfscan (#442)
2026-10-05 13:38:45 +00:00

12 lines
354 B
Swift

import CommonCrypto
import Foundation
/// Checks a firmware image before it is sent to the pump.
enum Checksum {
static func digest(_ data: Data) -> [UInt8] {
var out = [UInt8](repeating: 0, count: Int(CC_SHA1_DIGEST_LENGTH))
data.withUnsafeBytes { _ = CC_SHA1($0.baseAddress, CC_LONG(data.count), &out) }
return out
}
}