EncryptUtils class

Name: 加密工具类 Created by Fitem on 2023/6/9

Constructors

EncryptUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

aesDecrypt(String content, String keyStr, [AESModeType type = AESModeType.ecb]) → dynamic
AES解密, 默认AESMode.ecb加密方式 content 密文 aesKey 秘钥
aesEncrypt(String content, String keyStr, [AESModeType type = AESModeType.ecb]) → dynamic
AES加密, 默认AESMode.ecb加密方式 content 明文 aesKey 秘钥
md5Encrypt(String content) String
MD5加密 content 加密内容
md5withRSASign(String content, String privateKeyStr) Future<String>
MD5withRSA签名,秘钥格式为pkcs8 content明文 privateKeyStr私钥
md5withRSAVerify(String content, String signature, String publicKeyStr) Future<bool>
MD5withRSA验签,秘钥格式为pkcs8 content明文 signature签名 publicKeyStr公钥
rc4Decrypt(String content, String keyStr) String
RC4解密 content 密文
rc4Encrypt(String content, String keyStr) String
RC4加密 content 明文
rsaDecrypt(String encryptedStr, String privateKeyStr) String
RSA加密算法解密,秘钥格式为pkcs8 encryptedStr密文,base64编码 privateKeyStr私钥
rsaEncrypt(String content, String publicKeyStr) String
RSA加密算法加密,秘钥格式为pkcs8 content明文 publicKeyStr公钥
sha256withRSASign(String content, String privateKeyStr) String
SHA256withRSA签名,秘钥格式为pkcs8 content明文 privateKeyStr私钥
sha256withRSAVerify(String content, String signature, String publicKeyStr) bool
SHA256withRSA验签,秘钥格式为pkcs8 content明文 signature签名 publicKeyStr公钥