Commit 217408ab authored by Rob Pike's avatar Rob Pike

crypto: update incorrect references to Cipher interface; should be Block.

R=gri, rsc, r
CC=golang-dev
https://golang.org/cl/5372050
parent 6c10aa19
<!-- title The Go Programming Language Specification --> <!-- title The Go Programming Language Specification -->
<!-- subtitle Version of November 1, 2011 --> <!-- subtitle Version of November 9, 2011 -->
<!-- <!--
TODO TODO
...@@ -1688,7 +1688,7 @@ type TreeNode struct { ...@@ -1688,7 +1688,7 @@ type TreeNode struct {
value *Comparable value *Comparable
} }
type Cipher interface { type Block interface {
BlockSize() int BlockSize() int
Encrypt(src, dst []byte) Encrypt(src, dst []byte)
Decrypt(src, dst []byte) Decrypt(src, dst []byte)
...@@ -1720,8 +1720,8 @@ type PrintableMutex struct { ...@@ -1720,8 +1720,8 @@ type PrintableMutex struct {
Mutex Mutex
} }
// MyCipher is an interface type that has the same method set as Cipher. // MyBlock is an interface type that has the same method set as Block.
type MyCipher Cipher type MyBlock Block
</pre> </pre>
<p> <p>
......
...@@ -41,7 +41,7 @@ func NewCipher(key []byte) (*Cipher, error) { ...@@ -41,7 +41,7 @@ func NewCipher(key []byte) (*Cipher, error) {
} }
// BlockSize returns the AES block size, 16 bytes. // BlockSize returns the AES block size, 16 bytes.
// It is necessary to satisfy the Cipher interface in the // It is necessary to satisfy the Block interface in the
// package "crypto/cipher". // package "crypto/cipher".
func (c *Cipher) BlockSize() int { return BlockSize } func (c *Cipher) BlockSize() int { return BlockSize }
......
...@@ -54,7 +54,7 @@ func NewSaltedCipher(key, salt []byte) (*Cipher, error) { ...@@ -54,7 +54,7 @@ func NewSaltedCipher(key, salt []byte) (*Cipher, error) {
} }
// BlockSize returns the Blowfish block size, 8 bytes. // BlockSize returns the Blowfish block size, 8 bytes.
// It is necessary to satisfy the Cipher interface in the // It is necessary to satisfy the Block interface in the
// package "crypto/cipher". // package "crypto/cipher".
func (c *Cipher) BlockSize() int { return BlockSize } func (c *Cipher) BlockSize() int { return BlockSize }
......
...@@ -44,7 +44,7 @@ func NewCipher(key []byte) (*Cipher, error) { ...@@ -44,7 +44,7 @@ func NewCipher(key []byte) (*Cipher, error) {
} }
// BlockSize returns the XTEA block size, 8 bytes. // BlockSize returns the XTEA block size, 8 bytes.
// It is necessary to satisfy the Cipher interface in the // It is necessary to satisfy the Block interface in the
// package "crypto/cipher". // package "crypto/cipher".
func (c *Cipher) BlockSize() int { return BlockSize } func (c *Cipher) BlockSize() int { return BlockSize }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment