MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / encode

Method encode

sql/sql_crypt.cc:51–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51void SQL_CRYPT::encode(char *str,uint length)
52{
53 for (uint i=0; i < length; i++)
54 {
55 shift^=(uint) (my_rnd(&rand)*255.0);
56 uint idx= (uint) (uchar) str[0];
57 *str++ = (char) ((uchar) encode_buff[idx] ^ shift);
58 shift^= idx;
59 }
60}
61
62
63void SQL_CRYPT::decode(char *str,uint length)

Callers 1

crypto_transformMethod · 0.80

Calls 1

my_rndFunction · 0.85

Tested by

no test coverage detected