EncryptUtil class

加密工具类,支持AES、Base64等方法

Constructors

EncryptUtil()

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 encryptStr, String key, String iv) String
使用AES(CBC模式+PKCS7填充)对内容进行解密
aesEncrypt(String content, String key, String iv) String
使用AES(CBC模式+PKCS7填充)对内容进行加密
decodeBase64(String base64Code) Uint8List
将 Base64 编码字符串解码为 Uint8List
encodeBase64(Uint8List bytes) String
bytes 转换为 Base64 编码字符串
initHexKey() String
生成随机的128位(16字节)AES十六进制密钥