Skip to content

百度签名算法,规范字符串Normalized String

Notifications You must be signed in to change notification settings

shleyZ/UriEncode_rfc3986

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

UriEncode_rfc3986

百度签名算法,规范字符串Normalized String

RFC 3986规定,"URI非保留字符"包括以下字符:字母(A-Z,a-z)、数字(0-9)、连字号(-)、点号(.)、下划线(_)、波浪线(~),算法实现如下:

  1. 将字符串转换成UTF-8编码的字节流
  2. 保留所有“URI非保留字符”原样不变
  3. 对其余字节做一次RFC 3986中规定的百分号编码(Percent-encoding),即一个“%”后面跟着两个表示该字节值的十六进制字母,字母一律采用大写形式。

About

百度签名算法,规范字符串Normalized String

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published