Skip to content
Snippets Groups Projects
Commit a46102d2 authored by Russ Cox's avatar Russ Cox
Browse files

crypto/cipher: make NewCBCEncrypter return BlockMode

Fixes #1389.

R=agl1
CC=golang-dev
https://golang.org/cl/3827043
parent 754f0402
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ type cbcDecrypter cbc ...@@ -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))
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment