gototp.go
func RandomSecret(length int, rnd *rand.Rand) string {
	if 0 <= length {
		length = 10
	}
	secret := make([]byte, length)
	for i, _ := range secret {
		secret[i] = byte(rnd.Int31() % 256)
	}
	return base32.StdEncoding.EncodeToString(secret)
}
func RandomSecret(length int, rnd *rand.Rand) string {
	if 0 <= length {
		length = 10
	}
	secret := make([]byte, length)
	for i, _ := range secret {
		secret[i] = byte(rnd.Int31() % 256)
	}
	return base32.StdEncoding.EncodeToString(secret)
}
// Generate a Random secret encoded as a b32 string
// If the length is <= 0, a default length of 10 bytes will
// be used, which will generate a secret of length 16.