AesCryptography 类 |
命名空间: HslCommunication.Core.Security
AesCryptography 类型公开以下成员。
名称 | 说明 | |
---|---|---|
AesCryptography |
使用指定的密钥实例化一个AES加密解密的对象,密钥由32位数字或字母组成,例如 12345678123456781234567812345678
|
名称 | 说明 | |
---|---|---|
Decrypt(Byte) |
对原始的数据进行解密的操作,返回解密之后的二进制原始数据 Decrypt the original data and return the decrypted binary original data | |
Decrypt(String) |
针对Base64字符串进行解密操作,转为二进制数据后进行解密,解密之后使用UTF8编码获取最终的字符串数据 Decrypt the Base64 string, convert it to binary data, and decrypt it. After decryption, use UTF8 encoding to obtain the final string data. | |
Encrypt(Byte) |
对原始的数据进行加密的操作,返回加密之后的二进制原始数据 Encrypt the original data and return the encrypted binary original data | |
Encrypt(String) |
针对字符串进行加密,并返回加密后的字符串数据,字符串的编码默认为UTF8,加密后返回Base64编码 Encrypt the string and return the encrypted string data. The encoding of the string is UTF8 by default. After encryption, the Base64 encoding is returned. | |
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。) | |
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. |