Skip to content

Commit 6ef0d11

Browse files
committed
Re-enabling support for go 1.12.
1 parent dc9523e commit 6ef0d11

File tree

6 files changed

+33
-9
lines changed

6 files changed

+33
-9
lines changed

.github/workflows/ci-actions.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-18.04
1313
strategy:
1414
matrix:
15-
GOVER: ['1.14', '1.13']
15+
GOVER: ['1.14', '1.13', '1.12']
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v2

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/cloudflare/circl
22

3-
go 1.13
3+
go 1.12
44

5-
require golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae
5+
require golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
2-
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1+
golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed h1:uPxWBzB3+mlnjy9W58qY1j/cjyFjutgw/Vhan2zLy/A=
2+
golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

sign/ed25519/ed25519.go

-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ package ed25519
3838
import (
3939
"bytes"
4040
"crypto"
41-
cryptoEd25519 "crypto/ed25519"
4241
cryptoRand "crypto/rand"
4342
"crypto/sha512"
4443
"crypto/subtle"
@@ -90,9 +89,6 @@ const (
9089
ED25519Ctx
9190
)
9291

93-
// PublicKey is the type of Ed25519 public keys.
94-
type PublicKey = cryptoEd25519.PublicKey
95-
9692
// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
9793
type PrivateKey []byte
9894

sign/ed25519/pubkey.go

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// +build !go1.12
2+
3+
package ed25519
4+
5+
import cryptoEd25519 "crypto/ed25519"
6+
7+
// PublicKey is the type of Ed25519 public keys.
8+
type PublicKey = cryptoEd25519.PublicKey

sign/ed25519/pubkey112.go

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// +build go1.12
2+
3+
package ed25519
4+
5+
import (
6+
"bytes"
7+
"crypto"
8+
)
9+
10+
// PublicKey is the type of Ed25519 public keys.
11+
type PublicKey []byte
12+
13+
// Equal reports whether pub and x have the same value.
14+
func (pub PublicKey) Equal(x crypto.PublicKey) bool {
15+
xx, ok := x.(PublicKey)
16+
if !ok {
17+
return false
18+
}
19+
return bytes.Equal(pub, xx)
20+
}

0 commit comments

Comments
 (0)