Closed syedJunaidd closed 5 years ago
while instantiating the TOTP object via: otp, err := twofactor.NewTOTP("info@sec51.com", "Sec51", crypto.SHA1, 8) if err != nil { fmt.Println(err) }
otp, err := twofactor.NewTOTP("info@sec51.com", "Sec51", crypto.SHA1, 8)
if err != nil {
fmt.Println(err)
}
i got this error: .\main.go:8:60: undefined: crypto
.\main.go:8:60: undefined: crypto
this is my go file:
package main
import "fmt" import "github.com/sec51/twofactor"
import "fmt"
import "github.com/sec51/twofactor"
func main(){ fmt.Println("ds") otp, err := twofactor.NewTOTP("info@sec51.com", "Sec51", crypto.SHA1, 8) if err != nil { fmt.Println(err) }
func main(){
fmt.Println("ds")
qrBytes, err := otp.QR() if err != nil { fmt.Println(err) }
qrBytes, err := otp.QR()
I am newbee to golang and authentication process so may be i am missing any dependency here. Thanks.
Sorry my bad, I think i was not importing go "crypto" package.
while instantiating the TOTP object via:
otp, err := twofactor.NewTOTP("info@sec51.com", "Sec51", crypto.SHA1, 8)
if err != nil {
fmt.Println(err)
}
i got this error:
.\main.go:8:60: undefined: crypto
this is my go file:
package main
import "fmt"
import "github.com/sec51/twofactor"
func main(){
fmt.Println("ds")
otp, err := twofactor.NewTOTP("info@sec51.com", "Sec51", crypto.SHA1, 8)
if err != nil {
fmt.Println(err)
}
qrBytes, err := otp.QR()
if err != nil {
fmt.Println(err)
}
}
I am newbee to golang and authentication process so may be i am missing any dependency here. Thanks.