crypto/cipher: panic when IV length does not equal block size in NewOFB
Functions like NewCBCDecrypter, NewCBCEncrypter, NewCFBDecrypter, NewCFBEncrypter and NewCTR all panic when IV length does not equal block size. This commit changes NewOFB to panic too, instead of returning nil silently. Change-Id: Ic4d3ebfad79bb0cf4759fa1c1a400c1a8d043490 Reviewed-on: https://go-review.googlesource.com/61850Reviewed-by: Filippo Valsorda <hi@filippo.io> Run-TryBot: Filippo Valsorda <hi@filippo.io> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please
register
or
sign in
to comment