Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcPassword ¶
CalcPassword is the algorithm convert hashed password to auth string. See https://dev.mysql.com/doc/internals/en/secure-password-authentication.html SHA1( password ) XOR SHA1( "20-bytes random data from server" <concat> SHA1( SHA1( password ) ) )
func DecodePassword ¶
DecodePassword converts hex string password to byte array.
func EncodePassword ¶
EncodePassword converts plaintext password to hashed hex string.
func RunWithRetry ¶
RunWithRetry will run the f with backoff and retry. retryCnt: Max retry count backoff: When run f failed, it will sleep backoff * triedCount time.Millisecond. Function f should have two return value. The first one is an bool which indicate if the err if retryable. The second is if the f meet any error.
Types ¶
This section is empty.