]> Cypherpunks repositories - gostls13.git/commit
crypto/cipher: panic when IV length does not equal block size in NewOFB
authorJoe Kyo <xunianzu@gmail.com>
Wed, 6 Sep 2017 09:31:03 +0000 (10:31 +0100)
committerFilippo Valsorda <hi@filippo.io>
Wed, 6 Sep 2017 14:53:44 +0000 (14:53 +0000)
commit16edf0b1f7401df07e0d2f96c8b97516e50cffd9
tree8032f353c26ce283f32f98d483fbf99fa46462e0
parent6c102e141c5858d1b900afad8dd616370f6091bb
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/61850
Reviewed-by: Filippo Valsorda <hi@filippo.io>
Run-TryBot: Filippo Valsorda <hi@filippo.io>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/cipher/ofb.go