microsoft / go-crypto-winnative

Go crypto backend for Windows using CNG
MIT License
28 stars 3 forks source link

sha: add WriteString and WriteByte method #36

Closed qmuntal closed 1 year ago

qmuntal commented 1 year ago

This PR implements WriteString and WriteByte for all supported hashers. These methods will be required by the boring API in go1.21.

See CL 483816, 483815, and CL 481478.

qmuntal commented 1 year ago

Not sure if you considered reflect.StringHeader, but avoiding the reflect dependency and manually making the type and defining it to be slightly more useful for this case makes sense.

Yep. I want to avoid importing reflect for such a simple struct.