Fixed code smells
Some checks failed
Run tests / test (1.25) (push) Failing after 15s
Run tests / test (stable) (push) Failing after 17s

This commit is contained in:
2026-02-22 21:14:58 +01:00
parent 3bcbaf2135
commit 32f6c38c13
17 changed files with 1593 additions and 22 deletions

View File

@@ -53,7 +53,7 @@ func (priv *PrivateKey) Sign(_ io.Reader, digest []byte, _ crypto.SignerOpts) (s
func (priv *PrivateKey) Public() crypto.PublicKey {
p := &PublicKey{}
newPublicKey(p, priv.pub[:])
_, _ = newPublicKey(p, priv.pub[:])
return p
}
@@ -118,7 +118,9 @@ func GenerateKey() (*PublicKey, *PrivateKey, error) {
}
func generateKey(priv *PrivateKey) (*PrivateKey, error) {
rand.Read(priv.seed[:])
if _, err := rand.Read(priv.seed[:]); err != nil {
return nil, err
}
precomputePrivateKey(priv)
return priv, nil
}