File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import (
2929 "crypto/rand"
3030 "crypto/rsa"
3131 "crypto/sha256"
32+ "errors"
3233 "fmt"
3334 "io"
3435 "math/big"
@@ -128,7 +129,7 @@ func (c *Cipher) Decoder(r io.Reader) (io.ReadCloser, error) {
128129 return piper .NewAES (aesKey , AES_GUARD ).Decoder (r )
129130}
130131
131- var ErrNotRecipient = fmt . Errorf ("not a recipient, the data is not encrypted for your public key" )
132+ var ErrNotRecipient = errors . New ("not a recipient, the data is not encrypted for your public key" )
132133
133134func EncryptSharedSecret (sharedKey []byte , pub crypto.PublicKey ) ([]byte , error ) {
134135 switch key := pub .(type ) {
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ func fetchPublicKey(location string) whisper.PublicKey {
294294 return whisper.PublicKey {Data : b }
295295}
296296
297- var errPrvKeyExists = fmt . Errorf ("private key already exists" )
297+ var errPrvKeyExists = errors . New ("private key already exists" )
298298
299299func genKey (path string ) {
300300 if _ , err := os .Stat (path ); err == nil {
You can’t perform that action at this time.
0 commit comments