TelemetryDeck / SwiftSDK

Swift SDK for TelemetryDeck, a privacy-conscious analytics service for apps and websites.
https://telemetrydeck.com/
Other
149 stars 31 forks source link

Use Apples CryptoKit when available & fall back to CommonCrypto #58

Closed Jeehut closed 1 year ago

Jeehut commented 2 years ago

This makes sure that Apple devices use Apples newer CryptoKit library for generating a SHA256 hash for improved safety & performance.

Note that there was a need for double-checking with both #if canImport(CryptoKit) and if #available to ensure full compatibility with all platforms & devices. See also here.

winsmith commented 1 year ago

Amazing! Thank you very much!