Skip to content

Commit

Permalink
Reduce verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
K1li4nL committed Mar 28, 2024
1 parent 0af6c4f commit cb72df8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions xof/blake2xb/blake.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ func New(seed []byte) kyber.XOF {
panic("blake2b.XOF.Write should not return error: " + err.Error())
}
}

seedCopy := make([]byte, len(seed))
copy(seedCopy, seed)
x := xof{impl: b, seed: seedCopy}

return &x
return &xof{impl: b, seed: seedCopy}
}

func (x *xof) Clone() kyber.XOF {
Expand Down
3 changes: 1 addition & 2 deletions xof/blake2xs/blake.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ func New(seed []byte) kyber.XOF {

seedCopy := make([]byte, len(seed))
copy(seedCopy, seed)
x := xof{impl: b, seed: seedCopy}
return &x
return &xof{impl: b, seed: seedCopy}
}

func (x *xof) Clone() kyber.XOF {
Expand Down

0 comments on commit cb72df8

Please sign in to comment.