Skip to content

Instantly share code, notes, and snippets.

Kian Lavi kianlavi

View GitHub Profile
@kianlavi
kianlavi / HashHouse.swift
Created Apr 28, 2016
Create a random hash of length(x)
View HashHouse.swift
// HashHash: make some random numbers, randomly.
import UIKit
func newString(length: Int) -> String {
let allowed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
// uncomment this if you want all numbers
// let allowed = "1234567890"
let allowedCount = UInt32(allowed.characters.count)
You can’t perform that action at this time.