1
0
mirror of https://github.com/golang/go synced 2024-11-11 18:21:40 -07:00
Change-Id: I8a2e547c352aa089bd0cf8592acdca74e528d73d
This commit is contained in:
Mateusz Poliwczak 2024-08-03 09:47:20 +02:00
parent 1196a227bc
commit c631b19068

View File

@ -303,6 +303,7 @@ func (h *sha224Hash) AppendBinary(b []byte) ([]byte, error) {
b = byteorder.BeAppendUint32(b, d.h[5])
b = byteorder.BeAppendUint32(b, d.h[6])
b = byteorder.BeAppendUint32(b, d.h[7])
b = append(b, d.x[:d.nx]...)
b = append(b, make([]byte, len(d.x)-int(d.nx))...)
b = byteorder.BeAppendUint64(b, uint64(d.nl)>>3|uint64(d.nh)<<29)
return b, nil
@ -323,6 +324,7 @@ func (h *sha256Hash) AppendBinary(b []byte) ([]byte, error) {
b = byteorder.BeAppendUint32(b, d.h[5])
b = byteorder.BeAppendUint32(b, d.h[6])
b = byteorder.BeAppendUint32(b, d.h[7])
b = append(b, d.x[:d.nx]...)
b = append(b, make([]byte, len(d.x)-int(d.nx))...)
b = byteorder.BeAppendUint64(b, uint64(d.nl)>>3|uint64(d.nh)<<29)
return b, nil