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

« back to all changes in this revision

Viewing changes to src/pkg/crypto/openpgp/packet/symmetrically_encrypted.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:
47
47
// packet can be read. An incorrect key can, with high probability, be detected
48
48
// immediately and this will result in a KeyIncorrect error being returned.
49
49
func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, os.Error) {
50
 
        keySize := c.keySize()
 
50
        keySize := c.KeySize()
51
51
        if keySize == 0 {
52
52
                return nil, error.UnsupportedError("unknown cipher: " + strconv.Itoa(int(c)))
53
53
        }
255
255
// to w and returns a WriteCloser to which the to-be-encrypted packets can be
256
256
// written.
257
257
func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, key []byte) (contents io.WriteCloser, err os.Error) {
258
 
        if c.keySize() != len(key) {
 
258
        if c.KeySize() != len(key) {
259
259
                return nil, error.InvalidArgumentError("SymmetricallyEncrypted.Serialize: bad key length")
260
260
        }
261
261
        writeCloser := noOpCloser{w}