JPK - CryptoAPI RSA 256/ECB/PKCS#1 one time secret password encryption with public key from certificate (solution)
问题 Polish government (MF - Ministry of Finance) recently implemented SAF-T (Standard Audit File-Tax / pl: JPK - Jednolity Plik Kontrolny). I had much trouble to implement one of the key parts of this solution in the right way. This part is to encrypt user generated password used to encrypt files, sended to Azure Cloud Storage, with RSA 256/ECB/PKCS#1 algorithm from MS CryptoAPI, using public key loaded from certificate file served by the MF. 回答1: My working solution to this is (uses JEDI API