From: Russ Cox Date: Thu, 6 Jan 2011 16:21:04 +0000 (-0500) Subject: crypto/cipher: make NewCBCEncrypter return BlockMode X-Git-Tag: weekly.2011-01-06~7 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a46102d2094126c7e33cfd9b90e739e7ad1ab9b7;p=gostls13.git crypto/cipher: make NewCBCEncrypter return BlockMode Fixes #1389. R=agl1 CC=golang-dev https://golang.org/cl/3827043 --- diff --git a/src/pkg/crypto/cipher/cbc.go b/src/pkg/crypto/cipher/cbc.go index 3efc863282..4632f882a4 100644 --- a/src/pkg/crypto/cipher/cbc.go +++ b/src/pkg/crypto/cipher/cbc.go @@ -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)) }