~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/pkg/crypto/aes/cipher.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
// BlockSize returns the AES block size, 16 bytes.
47
47
// It is necessary to satisfy the Cipher interface in the
48
 
// package "crypto/block".
 
48
// package "crypto/cipher".
49
49
func (c *Cipher) BlockSize() int { return BlockSize }
50
50
 
51
51
// Encrypt encrypts the 16-byte buffer src using the key k
52
52
// and stores the result in dst.
53
53
// Note that for amounts of data larger than a block,
54
54
// it is not safe to just call Encrypt on successive blocks;
55
 
// instead, use an encryption mode like CBC (see crypto/block/cbc.go).
 
55
// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go).
56
56
func (c *Cipher) Encrypt(dst, src []byte) { encryptBlock(c.enc, dst, src) }
57
57
 
58
58
// Decrypt decrypts the 16-byte buffer src using the key k