~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/crypto/rsa/pkcs1v15.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:
232
232
func pkcs1v15HashInfo(hash crypto.Hash, inLen int) (hashLen int, prefix []byte, err os.Error) {
233
233
        hashLen = hash.Size()
234
234
        if inLen != hashLen {
235
 
                return 0, nil, os.ErrorString("input must be hashed message")
 
235
                return 0, nil, os.NewError("input must be hashed message")
236
236
        }
237
237
        prefix, ok := hashPrefixes[hash]
238
238
        if !ok {
239
 
                return 0, nil, os.ErrorString("unsupported hash function")
 
239
                return 0, nil, os.NewError("unsupported hash function")
240
240
        }
241
241
        return
242
242
}