mirror of
https://github.com/golang/go
synced 2024-11-20 10:34: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:
parent
754f0402c3
commit
a46102d209
@ -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))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user