1
0
mirror of https://github.com/golang/go synced 2024-11-25 10:57:58 -07:00

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

R=gri, rsc, r
CC=golang-dev
https://golang.org/cl/5372050
This commit is contained in:
Rob Pike 2011-11-09 14:22:44 -08:00
parent 6c10aa19b8
commit 217408abf3
4 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<!-- 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 {
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 {
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>

View File

@ -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 }

View File

@ -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 }

View File

@ -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 }