panic: crypto: requested hash function #5 is unavailable
I get the following error when I create a new Client
panic: crypto: requested hash function #5 is unavailable
goroutine 1 [running]:
crypto.Hash.New(0x5, 0x0, 0x0)
C:/Go/src/crypto/crypto.go:89 +0x117
github.com/getinsomnia/go-srp.getMultiplier(0xc0420464a0, 0x20)
C:/Drive/Programming/go/src/github.com/getinsomnia/go-srp/srp.go:93 +0x3a
github.com/getinsomnia/go-srp.NewClient(0xc0420464a0, 0xc04204a180, 0x20, 0x20, 0xc042067f10, 0x9, 0x20, 0xc042067ef0, 0x8, 0x20, ...)
C:/Drive/Programming/go/src/github.com/getinsomnia/go-srp/client.go:23 +0x47
main.main()
@gschier Could you please help
It looks like maybe your hardware doesn't support that specific cryptography hash function. What hardware/os/go version are you using?
I tried it on 3 systems, one had Linux(Ubuntu 17.10) and the other windows 10 and the other Mac OS. I used go 1.9.3 on AMD 64 arch
I meant all three systems had the same architecture AMD 64
you may want to try importing #5 and see if that works.
_ "crypto/sha256"
Encountered the same issue recently on Mac OS 10.14.2. Importing _ crypto/sha256 resolved the issue.