microsoft / go-crypto-winnative

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

Update `loadOrStoreAlg` to accept type parameters #63

Closed qmuntal closed 3 weeks ago

qmuntal commented 3 weeks ago

loadOrStoreAlg is a bit cumbersome to use because it requires the caller to cast the return value to the correct type and handle the errors.

This PR updates loadOrStoreAlg so that callers don't have to type-cast the returned value nor handle the error by using type parameters.