Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
add "go.mod"
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Nov 29, 2018
1 parent 704ff01 commit d70a69b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 10 deletions.
18 changes: 10 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
sudo: false
language: go
go:
- 1.9
- 1.9.1
- 1.9.2
- 1.9.3
- 1.9.4
- 1.9.5
- 1.10.1
matrix:
include:
- go: "1.9.x"
- go: "1.10.x"
- go: "1.11.x"

env:
- GO111MODULE=on

before_install:
- go get -v ./...
- go get github.com/stretchr/testify/assert
- go get github.com/modocache/gover
- go get github.com/mattn/goveralls

script:
- go test -coverprofile=crypto.coverprofile
- go test -coverprofile=cipher.coverprofile ./cipher
Expand Down
2 changes: 1 addition & 1 deletion cipher/cipher.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func GenerateKey() (publicKey, privateKey string) {
return base64.RawURLEncoding.EncodeToString(public[:]), base64.RawURLEncoding.EncodeToString(private[:])
}

// Box use to encrypts/decrypts message with nacl/box (curve25519&salsa20), it implemented Cipher insterface.
// Box use to encrypts/decrypts message base on public key infrastructure (nacl/box, curve25519&salsa20), it implemented Cipher insterface.
type Box struct {
sharedEncryptKey *[32]byte
}
Expand Down
2 changes: 1 addition & 1 deletion crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

// Version -
const Version = "3.0.0"
const Version = "3.0.1"

// Equal compares two []byte for equality without leaking timing information.
//
Expand Down
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/teambition/crypto-go

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2
golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85
)

replace golang.org/x/crypto => github.com/golang/crypto v0.0.0-20181030102418-4d3f4d9ffa16
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/crypto v0.0.0-20181030102418-4d3f4d9ffa16 h1:eYYX4kSnlwJkijnThiBqTSx3NiIV1R2K1SkNo7viDi0=
github.com/golang/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:uZvAcrsnNaCxlh1HorK5dUQHGmEKPh2H/Rl1kehswPo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 h1:et7+NAX3lLIk5qUCTA9QelBjGE/NkhzYw/mhnr0s7nI=
golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=

0 comments on commit d70a69b

Please sign in to comment.