1
0
mirror of https://github.com/golang/go synced 2024-11-12 03:00:22 -07:00

crypto package documentation fix

Replaces stale references to modes.go.

R=golang-dev, agl, rsc
CC=golang-dev
https://golang.org/cl/218071
This commit is contained in:
Mark Zavislak 2010-02-23 12:01:09 -08:00 committed by Russ Cox
parent 79518b977f
commit 6a0af8e118
2 changed files with 6 additions and 6 deletions

View File

@ -44,15 +44,15 @@ func NewCipher(key []byte) (*Cipher, os.Error) {
} }
// BlockSize returns the AES block size, 16 bytes. // BlockSize returns the AES block size, 16 bytes.
// It is necessary to satisfy the Key interface in the // It is necessary to satisfy the Cipher interface in the
// package "crypto/modes". // package "crypto/block".
func (c *Cipher) BlockSize() int { return BlockSize } func (c *Cipher) BlockSize() int { return BlockSize }
// Encrypt encrypts the 16-byte buffer src using the key k // Encrypt encrypts the 16-byte buffer src using the key k
// and stores the result in dst. // and stores the result in dst.
// Note that for amounts of data larger than a block, // Note that for amounts of data larger than a block,
// it is not safe to just call Encrypt on successive blocks; // it is not safe to just call Encrypt on successive blocks;
// instead, use an encryption mode like AESCBC (see modes.go). // instead, use an encryption mode like CBC (see crypto/block/cbc.go).
func (c *Cipher) Encrypt(src, dst []byte) { encryptBlock(c.enc, src, dst) } func (c *Cipher) Encrypt(src, dst []byte) { encryptBlock(c.enc, src, dst) }
// Decrypt decrypts the 16-byte buffer src using the key k // Decrypt decrypts the 16-byte buffer src using the key k

View File

@ -47,14 +47,14 @@ func NewCipher(key []byte) (*Cipher, os.Error) {
} }
// BlockSize returns the XTEA block size, 8 bytes. // BlockSize returns the XTEA block size, 8 bytes.
// It is necessary to satisfy the Key interface in the // It is necessary to satisfy the Cipher interface in the
// package "crypto/modes". // package "crypto/block".
func (c *Cipher) BlockSize() int { return BlockSize } func (c *Cipher) BlockSize() int { return BlockSize }
// Encrypt encrypts the 8 byte buffer src using the key and stores the result in dst. // Encrypt encrypts the 8 byte buffer src using the key and stores the result in dst.
// Note that for amounts of data larger than a block, // Note that for amounts of data larger than a block,
// it is not safe to just call Encrypt on successive blocks; // it is not safe to just call Encrypt on successive blocks;
// instead, use an encryption mode like XTEACBC (see modes.go). // instead, use an encryption mode like CBC (see crypto/block/cbc.go).
func (c *Cipher) Encrypt(src, dst []byte) { encryptBlock(c, src, dst) } func (c *Cipher) Encrypt(src, dst []byte) { encryptBlock(c, src, dst) }
// Decrypt decrypts the 8 byte buffer src using the key k and stores the result in dst. // Decrypt decrypts the 8 byte buffer src using the key k and stores the result in dst.