Documentation ¶
Index ¶
- func CalcPassword(scramble, sha1pwd []byte) []byte
- func DecodePassword(pwd string) ([]byte, error)
- func DelKeyWithPrefix(rm kv.RetrieverMutator, prefix kv.Key) error
- func EncodePassword(pwd string) string
- func RowKeyPrefixFilter(rowKeyPrefix kv.Key) kv.FnKeyCmp
- func ScanMetaWithPrefix(retriever kv.Retriever, prefix kv.Key, filter func(kv.Key, []byte) bool) error
- func Sha1Hash(bs []byte) []byte
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 DelKeyWithPrefix ¶
func DelKeyWithPrefix(rm kv.RetrieverMutator, prefix kv.Key) error
DelKeyWithPrefix deletes keys with prefix.
func EncodePassword ¶
EncodePassword converts plaintext password to hashed hex string.
func RowKeyPrefixFilter ¶
RowKeyPrefixFilter returns a function which checks whether currentKey has decoded rowKeyPrefix as prefix.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.