microsoft / go-crypto-winnative

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

Implement sha and rand #2

Closed qmuntal closed 2 years ago

qmuntal commented 2 years ago

This PR has the following changes (review commit by commit):

qmuntal commented 2 years ago

@jaredpar you might want to review https://github.com/microsoft/go-crypto-winnative/pull/2/commits/c18affdb2479e9e08bcad5cdfb4c9c52c298b198, which I added after your last review.

It reduces boilerplate and makes the code safer by delegating to the autogenerated code the []byte -> *byte+length arguments transform.

qmuntal commented 2 years ago

I've filled an upstream proposal so we can delegate UTF16 string encoding to the autogenerated code: https://github.com/golang/go/issues/51786