转换RSA私钥 - ConvertRSAPrivateKey
函数简介
- 将RSA私钥从一种格式转换为另一种格式。
接口名称
ConvertRSAPrivateKey
DLL调用
long ConvertRSAPrivateKey(long instance, string privateKey, int inputType, int outputType)
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数 | OLAPlug实例指针,由 CreateCOLAPlugInterFace 接口生成。 |
| privateKey | 字符串 | 要转换的私钥。 |
| inputType | 整数 | 输入类型:0-pem格式;1-xml格式;2-PKCS1格式。 |
| outputType | 整数 | 输出类型:0-pem格式;1-xml格式;2-PKCS1格式。 |
示例
// 示例代码待补充
返回值
成功返回转换后的私钥字符串的指针;失败返回0。
注意事项
- 返回的字符串指针需要调用 FreeStringPtr 接口释放内存。
