Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
number571 committed Oct 30, 2024
1 parent 6f7c5c7 commit dc5e44d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions cmd/tools/keygen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"runtime"

"github.com/number571/go-peer/pkg/crypto/asymmetric"
"github.com/number571/go-peer/pkg/crypto/keybuilder"
"github.com/number571/go-peer/pkg/crypto/random"
"github.com/number571/go-peer/pkg/encoding"
)
Expand All @@ -20,8 +19,10 @@ func main() {

seedBytes := random.NewRandom().GetBytes(asymmetric.CKeySeedSize)
if *seed {
keyBuilder := keybuilder.NewKeyBuilder(0, []byte{})
seedBytes = keyBuilder.Build(readUntilEOL(), asymmetric.CKeySeedSize)
seedBytes = encoding.HexDecode(readUntilEOL())
if len(seedBytes) != asymmetric.CKeySeedSize {
panic("len(seedBytes) != asymmetric.CKeySeedSize")
}
}

priv := asymmetric.NewPrivKeyFromSeed(seedBytes)
Expand Down
2 changes: 1 addition & 1 deletion test/result/badge_codelines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions test/result/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dc5e44d

Please sign in to comment.