EncryptUtil class

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

hmacSign(String secret, String payload) String
md5Base64(List<int> bytes) String
md5Hex(List<int> bytes) String
signature({required String accessKeySecret, required String method, String contentMD5 = '', String contentType = '', String date = '', required Map<String, dynamic> headers, required String resource}) String
签名 accessKeySecret 秘钥 method HTTP请求方法,全大写英文。取值包括GET、POST、PUT和DELETE contentMD5 HTTP请求消息Body的MD5哈希值,转换为十六进制大写英文字符串。若Body为空,此项为空字符串 contentType HTTP请求消息Body的MIME类型,若Body为空,此项为空字符串 date HTTP请求消息头中Date字段的值,当前时间的格式化字符串。格式为RFC822/RFC1123,格式化字符串为%a, %d %b %Y %H:%M:%S GMT,时区为GMT标准时间。 headers header中阿里云专有请求头,按 key升序排序后,以 : 连接键值,以换行符分隔键值对。 resource HTTP请求消息URI,包含请求参数,格式为/bucket/object?param1=value1&param2=value2