Created
November 21, 2013 01:47
-
-
Save daveshah/7574713 to your computer and use it in GitHub Desktop.
creating a random file name:
Generating a (probable) prime number 100 bits in length then converting to the base 36 string representation
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
import math.BigInt | |
import math.BigInt._ | |
import util._ | |
val randomFileName = probablePrime(100,Random) toString 36 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment