Skip to content

Commit

Permalink
drbg: rollback hash drbg change
Browse files Browse the repository at this point in the history
  • Loading branch information
emmansun authored Jun 5, 2024
1 parent 10a97b4 commit 95bc879
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drbg/hash_drbg.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (hd *HashDrbg) Generate(b, additional []byte) error {
}
if hd.gm { // leftmost(Hash(V))
md.Write(hd.v)
md.Sum(b[:0])
copy(b, md.Sum(nil))
md.Reset()
} else {
limit := uint64(m+md.Size()-1) / uint64(md.Size())
Expand Down

0 comments on commit 95bc879

Please sign in to comment.