Skip to content

Commit 1aa9c6e

Browse files
committed
Merge branch 'release/0.0.7'
2 parents 8becdca + 0f1b5ac commit 1aa9c6e

7 files changed

Lines changed: 63 additions & 37 deletions

File tree

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "gomod"
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "monthly"
12+
- package-ecosystem: "github-actions"
13+
directory: "/" # Location of package manifests
14+
schedule:
15+
interval: "monthly"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
name: Build & release
6+
jobs:
7+
releases-matrix:
8+
name: Build
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
goos: [linux, windows, darwin]
13+
goarch: ["386", amd64, arm, arm64]
14+
exclude:
15+
- goarch: "386"
16+
goos: darwin
17+
- goarch: arm
18+
goos: darwin
19+
- goarch: arm
20+
goos: windows
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
# build the binaries
25+
- uses: wangyoucao577/go-release-action@v1.41
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
goos: ${{ matrix.goos }}
29+
goarch: ${{ matrix.goarch }}
30+
binary_name: "wireguard-vanity-keygen"
31+
pre_command: export CGO_ENABLED=0
32+
asset_name: wireguard-vanity-keygen-${{ matrix.goos }}-${{ matrix.goarch }}
33+
extra_files: LICENSE README.md
34+
md5sum: false
35+
overwrite: true
36+
retry: 5
37+
ldflags: -w -X "main.appVersion=${{ github.ref_name }}"

Makefile

Lines changed: 0 additions & 27 deletions
This file was deleted.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ go 1.17
44

55
require (
66
github.com/spf13/pflag v1.0.5
7-
golang.org/x/crypto v0.17.0
7+
golang.org/x/crypto v0.18.0
88
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
33
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
44
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
55
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
6-
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
7-
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
6+
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
7+
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
88
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
99
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
1010
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -22,12 +22,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
2222
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2323
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2424
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
25-
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
25+
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
2626
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
2727
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
2828
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
2929
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
30-
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
30+
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
3131
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
3232
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
3333
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=

keygen/crypto.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package keygen is a library to generate keys
12
package keygen
23

34
import (
@@ -11,7 +12,7 @@ import (
1112
const KeySize = 32
1213

1314
// Key is curve25519 key.
14-
// It is used by WireGuard to represent public and preshared keys.
15+
// It is used by WireGuard to represent public and pre-shared keys.
1516
type Key [KeySize]byte
1617

1718
// PrivateKey is curve25519 key.
@@ -21,7 +22,7 @@ type PrivateKey [KeySize]byte
2122
// NewPrivateKey generates a new curve25519 secret key.
2223
// It conforms to the format described on https://cr.yp.to/ecdh.html.
2324
func newPrivateKey() (PrivateKey, error) {
24-
k, err := newPresharedKey()
25+
k, err := newPreSharedKey()
2526
if err != nil {
2627
return PrivateKey{}, err
2728
}
@@ -30,8 +31,8 @@ func newPrivateKey() (PrivateKey, error) {
3031
return (PrivateKey)(*k), nil
3132
}
3233

33-
// NewPresharedKey generates a new key
34-
func newPresharedKey() (*Key, error) {
34+
// NewPreSharedKey generates a new key
35+
func newPreSharedKey() (*Key, error) {
3536
var k [KeySize]byte
3637
_, err := rand.Read(k[:])
3738
if err != nil {

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func main() {
8080
sword = strings.ToLower(sword)
8181
}
8282
if !keygen.IsValidSearch(sword) {
83-
fmt.Printf("\n\"%s\" contains invalid characaters\n", word)
83+
fmt.Printf("\n\"%s\" contains invalid characters\n", word)
8484
fmt.Println("Valid characters include letters [a-z], numbers [0-9], + and /")
8585
os.Exit(2)
8686
}

0 commit comments

Comments
 (0)