Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64 ¶
RandomBase64 returns a base64 url encoded, unpadded string of random bytes. len is the length of bytes. It should be the multiple of 3 to get a string without padding: len * 8 / 6. 3 bytes -- 4 chars 6 bytes -- 8 chars 9 bytes -- 12 chars Wechat OAuth code has 32 characters, which is 24 bytes long; Wechat Access Token has 110 chars, which is 82.5 bytes? Wechat Refresh Token has 110 chars. OpenID has 28 chars, which is 21 bytes UnionID has 28 chars.
func StringWithCharset ¶
StringWithCharset generates a random string from the passed in charset.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.