Skip to content

Instantly share code, notes, and snippets.

@tsif
Last active October 8, 2019 14:51
Show Gist options
  • Save tsif/6da6fa118ad15ed985df336772653715 to your computer and use it in GitHub Desktop.
Save tsif/6da6fa118ad15ed985df336772653715 to your computer and use it in GitHub Desktop.
import CryptoKit
import Foundation
let path = Bundle.main.path(forResource: "video", ofType: "mp4")!
let data = FileManager.default.contents(atPath: path)!
let digest = SHA256.hash(data: data)
print(digest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment