CryptoUtil class
加密工具类
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
-
base64Decode(
String input) → Uint8List - Base64 解码
-
base64Encode(
List< int> bytes) → String - Base64 编码
-
base64UrlDecode(
String input) → Uint8List - Base64 URL 安全解码
-
base64UrlEncode(
List< int> bytes) → String - Base64 URL 安全编码
-
generateRandomString(
int length) → String - 生成随机字符串
-
generateUUID(
) → String - 生成 UUID v4
-
hmacSha256(
String key, String message) → String - 计算 HMAC-SHA256
-
md5Bytes(
List< int> bytes) → String - 计算字节的 MD5 哈希
-
md5File(
String filePath) → Future< String> - 计算文件的 MD5 哈希
-
md5String(
String input) → String - 计算字符串的 MD5 哈希
-
sha256Bytes(
List< int> bytes) → String - 计算字节的 SHA-256 哈希
-
sha256File(
String filePath) → Future< String> - 计算文件的 SHA-256 哈希
-
sha256Stream(
Stream< List< stream) → Future<int> >String> - 计算文件流的 SHA-256 哈希
-
sha256String(
String input) → String - 计算字符串的 SHA-256 哈希