1
0
mirror of https://github.com/libp2p/go-libp2p-core.git synced 2025-04-28 17:10:14 +08:00

Add defualt case with meaningful panic

This commit is contained in:
Cole Brown 2019-07-17 17:34:22 -04:00
parent bc01c84a59
commit 0ae8685baf

View File

@ -191,6 +191,8 @@ func KeyStretcher(cipherType string, hashType string, secret []byte) (StretchedK
case "AES-256":
ivSize = 16
cipherKeySize = 32
default:
panic("Unrecognized cipher, programmer error?")
}
hmacKeySize := 20