]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/cipher: make NewCBCEncrypter return BlockMode
authorRuss Cox <rsc@golang.org>
Thu, 6 Jan 2011 16:21:04 +0000 (11:21 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 6 Jan 2011 16:21:04 +0000 (11:21 -0500)
Fixes #1389.

R=agl1
CC=golang-dev
https://golang.org/cl/3827043

src/pkg/crypto/cipher/cbc.go

index 3efc8632827d710dc99c845bec994939d7944819..4632f882a4c12be0cdaa7cd2eb1d79c57d45eb2d 100644 (file)
@@ -57,7 +57,7 @@ type cbcDecrypter cbc
 // 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
 // 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))
 }