mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00: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:
parent
6c10aa19b8
commit
217408abf3
4 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<!-- title The Go Programming Language Specification -->
|
||||
<!-- subtitle Version of November 1, 2011 -->
|
||||
<!-- subtitle Version of November 9, 2011 -->
|
||||
|
||||
<!--
|
||||
TODO
|
||||
|
@ -1688,7 +1688,7 @@ type TreeNode struct {
|
|||
value *Comparable
|
||||
}
|
||||
|
||||
type Cipher interface {
|
||||
type Block interface {
|
||||
BlockSize() int
|
||||
Encrypt(src, dst []byte)
|
||||
Decrypt(src, dst []byte)
|
||||
|
@ -1720,8 +1720,8 @@ type PrintableMutex struct {
|
|||
Mutex
|
||||
}
|
||||
|
||||
// MyCipher is an interface type that has the same method set as Cipher.
|
||||
type MyCipher Cipher
|
||||
// MyBlock is an interface type that has the same method set as Block.
|
||||
type MyBlock Block
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -41,7 +41,7 @@ func NewCipher(key []byte) (*Cipher, error) {
|
|||
}
|
||||
|
||||
// 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".
|
||||
func (c *Cipher) BlockSize() int { return BlockSize }
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ func NewSaltedCipher(key, salt []byte) (*Cipher, error) {
|
|||
}
|
||||
|
||||
// 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".
|
||||
func (c *Cipher) BlockSize() int { return BlockSize }
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ func NewCipher(key []byte) (*Cipher, error) {
|
|||
}
|
||||
|
||||
// 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".
|
||||
func (c *Cipher) BlockSize() int { return BlockSize }
|
||||
|
||||
|
|
Loading…
Reference in a new issue