RSAHelper 类 |
命名空间: HslCommunication.Core.Security
RSAHelper 类型公开以下成员。
名称 | 说明 | |
---|---|---|
CreateRsaProviderFromPrivateKey(Byte) |
使用原始的私钥数据(PEM格式)来创建一个 RSA 算法加密解密的对象,可以直接用于加密解密操作 Use the original private key data (PEM format) to create an RSA algorithm encryption and decryption object, which can be directly used for encryption and decryption operations | |
CreateRsaProviderFromPrivateKey(String) |
使用 PEM 格式基于base64编码的私钥来创建一个 RSA 算法加密解密的对象,可以直接用于加密解密操作 Use the PEM format based on the base64-encoded private key to create an RSA algorithm encryption and decryption object, which can be directly used for encryption and decryption operations | |
CreateRsaProviderFromPublicKey(Byte) |
使用原始的公钥数据(PEM格式)来创建一个 RSA 算法加密解密的对象,可以直接用于加密或是验证签名操作 Use the original public key data (PEM format) to create an RSA algorithm encryption and decryption object, which can be directly used for encryption or signature verification | |
CreateRsaProviderFromPublicKey(String) |
PEM 格式基于base64编码的公钥来创建一个 RSA 算法加密解密的对象,可以直接用于加密或是验证签名操作 Use the original public key data (PEM format) to create an RSA algorithm encryption and decryption object, which can be directly used for encryption or signature verification | |
DecryptLargeDataByRSA |
对超过117字节限制的加密数据进行解密,解密出原始的字节数据,因为RSA本身限制了117字节,所以此处进行数据切割解密。 Decrypt the encrypted data that exceeds the 117-byte limit and decrypt the original byte data, because RSA itself limits 117 bytes, so the data is cut and decrypted here. | |
EncryptLargeDataByRSA |
对原始字节的数据进行加密,不限制长度,因为RSA本身限制了117字节,所以此处进行数据切割加密。 Encrypt the original byte data without limiting the length, because RSA itself limits 117 bytes, so the data is cut and encrypted here. | |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) | |
GetHashCode | Serves as the default hash function. (继承自 Object。) | |
GetPrivateKeyFromRSA |
从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 | |
GetPublicKeyFromRSA |
从RSA的算法对象里,获取到PEM格式的原始公钥数据,如果需要存储,或是显示,只需要 Convert.ToBase64String 方法 Obtain the original public 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 | |
GetType | Gets the Type of the current instance. (继承自 Object。) | |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) | |
ToString | Returns a string that represents the current object. (继承自 Object。) |
名称 | 说明 | |
---|---|---|
ToJsonString |
获取当前对象的JSON格式表示的字符串。 (由 HslExtension 定义。)Gets the string represented by the JSON format of the current object. |