Skip to content

Instantly share code, notes, and snippets.

@damianesteban
Created November 1, 2017 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damianesteban/60facc47869a1d5c9be68cfc22bf4c1f to your computer and use it in GitHub Desktop.
Save damianesteban/60facc47869a1d5c9be68cfc22bf4c1f to your computer and use it in GitHub Desktop.
Basic Key Generation w/ Swift
let keyData = NSMutableData(length: 64)!
let result = SecRandomCopyBytes(kSecRandomDefault, 64, keyData.mutableBytes.bindMemory(to: UInt8.self, capacity: 64))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment