diff --git a/drbg/hash_drbg.go b/drbg/hash_drbg.go index 5dced47..8774467 100644 --- a/drbg/hash_drbg.go +++ b/drbg/hash_drbg.go @@ -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())