Last active
April 30, 2018 12:54
-
-
Save laevandus/6a8d620ae11e708443afb3130022feac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let someData = "Random string".data(using: .utf8) { | |
let hash = someData.hash(for: .sha256) | |
print("hash=\(hash.base64EncodedString()).") | |
} | |
// hash=LclzKS0NtZFSuwQF5H2FpTralr75LsjrnE3et2LxkHs=. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment