It is now 15 years after. I was using TWAPI, so totally another framework, but at the end, Win32API calls are issued.
The point was already raised: sha_256 is not provided by the cstype "prov_rsa_full" for asymetric cryptography.
I have accquired a security context of type "prov_rsa_aes" and the error message dissapeared.