mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-27 20:56:18 +08:00
drbg: rollback hash drbg change
This commit is contained in:
parent
10a97b4c51
commit
95bc8792f8
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user