点击或拖拽改变大小

HslExtensionGetPEMPrivateKey 方法

从RSA的算法对象里,获取到PEM格式的原始私钥数据,如果需要存储,或是显示,只需要 Convert.ToBase64String 方法
Obtain the original private key data in PEM format from the RSA algorithm object. If you need to store or display it, you only need the Convert.ToBase64String method

命名空间:  HslCommunication
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public static byte[] GetPEMPrivateKey(
	this RSACryptoServiceProvider rsa
)

参数

rsa
类型:System.Security.CryptographyRSACryptoServiceProvider
RSA 算法的加密解密对象

返回值

类型:Byte
原始的私钥数据

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型 RSACryptoServiceProvider 的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。
参见