You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a cbc encrypter/decrypter (CryptBlocks) it doesn't check "The length
of src must be a multiple of the block size" (for example, I was expecting it to
use "default" padding of all zeros in that case, or some character sequence
delivered by others is dissatisfied the continue, it will panic. see
http://play.golang.org/p/3P1BzW76BC ). Post Go 1 it would likely be better to:
- CryptBlocks returns error, but this will change the signatures of CryptBlocks
- panic if the length of src is not a multiple of the block size, so it is clear where
is the actual error
ps:According to cipher.BlockMode
// CryptBlocks encrypts or decrypts a number of blocks. The length of
// src must be a multiple of the block size. Dst and src may point to
// the same memory.
CryptBlocks(dst, src []byte)
The text was updated successfully, but these errors were encountered:
by xuxinhua1984:
The text was updated successfully, but these errors were encountered: