xlzd / gotp

Golang OTP(One-Time Password) Library.
MIT License
468 stars 67 forks source link

gotp.RandomSecret(16) generates a random secret of lenth of 26 instead of 16 #26

Closed shadmanEV closed 9 months ago

shadmanEV commented 9 months ago
randomSecret := gotp.RandomSecret(16)
fmt.Println("Random secret:", randomSecret)
// Convert string to byte slice
byteSlice := []byte(randomSecret)

// Get the length of the byte slice (number of bytes)
byteLength := len(byteSlice)
fmt.Println("size",byteLength)  //26

This gives issue when scanning the generated qrcode of provision uri directly by google authenticator on iPhone