updated RandomString method, use crypto.Rand for security