Skip to content

Commit

Permalink
crypto/test: Fix Signature instance randomizer
Browse files Browse the repository at this point in the history
Value is required.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
  • Loading branch information
cthulhu-rider committed Jul 22, 2024
1 parent 1d007cf commit 7b94778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/test/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func FailSigner(s neofscrypto.Signer) neofscrypto.Signer {

// Signature returns random neofscrypto.Signature.
func Signature() neofscrypto.Signature {
sig := make([]byte, rand.Int()%128)
sig := make([]byte, 1+rand.Int()%128)
//nolint:staticcheck // cryptorandom is not required for testing
rand.Read(sig)
return neofscrypto.NewSignature(neofscrypto.Scheme(rand.Uint32()%3), Signer().Public(), sig)
Expand Down

0 comments on commit 7b94778

Please sign in to comment.