| 49 | |
| 50 | |
| 51 | void 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 | |
| 63 | void SQL_CRYPT::decode(char *str,uint length) |
no test coverage detected