mirror of
https://github.com/golang/go
synced 2024-11-21 14:44:40 -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:
parent
6c10aa19b8
commit
217408abf3
@ -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 New Issue
Block a user