1
0
mirror of https://github.com/golang/go synced 2024-11-20 08:24:42 -07:00

crypto/cipher: make NewCBCEncrypter return BlockMode

Fixes #1389.

R=agl1
CC=golang-dev
https://golang.org/cl/3827043
This commit is contained in:
Russ Cox 2011-01-06 11:21:04 -05:00
parent 754f0402c3
commit a46102d209

View File

@ -57,7 +57,7 @@ type cbcDecrypter cbc
// NewCBCDecrypter returns a BlockMode which decrypts in cipher block chaining // NewCBCDecrypter returns a BlockMode which decrypts in cipher block chaining
// mode, using the given Block. The length of iv must be the same as the // mode, using the given Block. The length of iv must be the same as the
// Block's block size as must match the iv used to encrypt the data. // Block's block size as must match the iv used to encrypt the data.
func NewCBCDecrypter(b Block, iv []byte) *cbcDecrypter { func NewCBCDecrypter(b Block, iv []byte) BlockMode {
return (*cbcDecrypter)(newCBC(b, iv)) return (*cbcDecrypter)(newCBC(b, iv))
} }