Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1536)

Unified Diff: src/pkg/crypto/openpgp/elgamal/elgamal.go

Issue 4607052: code review 4607052: os.Error API: don't export os.ErrorString, use os.NewEr... (Closed)
Patch Set: diff -r 6e3e06fb2dc3 https://go.googlecode.com/hg/ Created 13 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/crypto/dsa/dsa.go ('k') | src/pkg/crypto/rsa/pkcs1v15.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/crypto/openpgp/elgamal/elgamal.go
===================================================================
--- a/src/pkg/crypto/openpgp/elgamal/elgamal.go
+++ b/src/pkg/crypto/openpgp/elgamal/elgamal.go
@@ -37,7 +37,7 @@
func Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err os.Error) {
pLen := (pub.P.BitLen() + 7) / 8
if len(msg) > pLen-11 {
- err = os.ErrorString("elgamal: message too long")
+ err = os.NewError("elgamal: message too long")
return
}
@@ -97,7 +97,7 @@
}
if firstByteIsTwo != 1 || lookingForIndex != 0 || index < 9 {
- return nil, os.ErrorString("elgamal: decryption error")
+ return nil, os.NewError("elgamal: decryption error")
}
return em[index+1:], nil
}
« no previous file with comments | « src/pkg/crypto/dsa/dsa.go ('k') | src/pkg/crypto/rsa/pkcs1v15.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b