使用RSA私钥解密 - DecryptWithRsa
函数简介
- 使用RSA私钥对加密的密文进行解密。
接口名称
DecryptWithRsa
DLL调用
long DecryptWithRsa(long instance, string cipher, string privateKey, int paddingType)
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数 | OLAPlug实例指针,由 CreateCOLAPlugInterFace 接口生成。 |
| cipher | 字符串 | 要解密的密文。 |
| privateKey | 字符串 | RSA私钥。 |
| paddingType | 整数 | 填充类型:0-PKCS1;1-OAEP。 |
示例
// 示例代码待补充
返回值
成功返回解密后的明文字符串的指针;失败返回0。
注意事项
- 返回的字符串指针需要调用 FreeStringPtr 接口释放内存。
