Skip to content

Commit

Permalink
using github.com/ProtonMail/go-crypto instead of golang.org/x/crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
jerson committed Oct 1, 2021
1 parent 7f54a09 commit 943f208
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/jerson/openpgp-mobile
go 1.13

require (
github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7
github.com/google/flatbuffers v1.12.0
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
)

replace github.com/keybase/go-crypto => github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7 h1:DSqTh6nEes/uO8BlNcGk8PzZsxY2sN9ZL//veWBdTRI=
github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
github.com/google/flatbuffers v1.12.0 h1:/PtAHvnBY4Kqnx/xCQ3OIV9uYcSFGScBsWI3Oogeh6w=
github.com/google/flatbuffers v1.12.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4 h1:cTxwSmnaqLoo+4tLukHoB9iqHOu3LmLhRmgUxZo6Vp4=
Expand All @@ -6,7 +8,6 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45mi
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
8 changes: 4 additions & 4 deletions openpgp/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"encoding/base64"
"errors"
"fmt"
"golang.org/x/crypto/openpgp"
"golang.org/x/crypto/openpgp/armor"
errorsOpenpgp "golang.org/x/crypto/openpgp/errors"
"golang.org/x/crypto/openpgp/packet"
"github.com/ProtonMail/go-crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp/armor"
errorsOpenpgp "github.com/ProtonMail/go-crypto/openpgp/errors"
"github.com/ProtonMail/go-crypto/openpgp/packet"
"io"
"strings"
"time"
Expand Down
2 changes: 1 addition & 1 deletion openpgp/decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openpgp
import (
"bytes"
"fmt"
"golang.org/x/crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp"
"io"
"io/ioutil"
"os"
Expand Down
2 changes: 1 addition & 1 deletion openpgp/decrypt_symmetric.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"io/ioutil"
"os"

"golang.org/x/crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp"
)

func (o *FastOpenPGP) DecryptSymmetric(message, passphrase string, options *KeyOptions) (string, error) {
Expand Down
4 changes: 2 additions & 2 deletions openpgp/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package openpgp
import (
"bytes"
"fmt"
"golang.org/x/crypto/openpgp"
"golang.org/x/crypto/openpgp/armor"
"github.com/ProtonMail/go-crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp/armor"
"io/ioutil"
)

Expand Down
4 changes: 2 additions & 2 deletions openpgp/encrypt_symmetric.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package openpgp
import (
"bytes"
"fmt"
"golang.org/x/crypto/openpgp"
"golang.org/x/crypto/openpgp/armor"
"github.com/ProtonMail/go-crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp/armor"
"io/ioutil"
)

Expand Down
4 changes: 2 additions & 2 deletions openpgp/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package openpgp
import (
"bytes"
"fmt"
"github.com/ProtonMail/go-crypto/openpgp/armor"
"github.com/keybase/go-crypto/openpgp/packet"
"golang.org/x/crypto/openpgp/armor"

"github.com/ProtonMail/go-crypto/openpgp"
keybaseOpenPGP "github.com/keybase/go-crypto/openpgp"
"golang.org/x/crypto/openpgp"
)

func (o *FastOpenPGP) Generate(options *Options) (*KeyPair, error) {
Expand Down
2 changes: 1 addition & 1 deletion openpgp/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openpgp
import (
"errors"
"fmt"
"golang.org/x/crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp"
"strings"
"time"
)
Expand Down
4 changes: 2 additions & 2 deletions openpgp/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"io/ioutil"
"os"

"golang.org/x/crypto/openpgp"
"golang.org/x/crypto/openpgp/armor"
"github.com/ProtonMail/go-crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp/armor"
)

func (o *FastOpenPGP) Sign(message, publicKey, privateKey, passphrase string, options *KeyOptions) (string, error) {
Expand Down

0 comments on commit 943f208

Please sign in to comment.