给个加密算法,求解密算法(C语言版)
发布网友
发布时间:2024-10-23 20:46
我来回答
共2个回答
热心网友
时间:2024-11-07 13:29
or (size_t i = 0 ; i < len; ++i) {
uint8_t a = ( in[i] ^ seed ) >> 5;
uint8_t b = ( ( ((uint32_t)in[i]) << 20 ) ^ seed ) >> (20-3);
a &= 7;
b &= 248;
a = 7 & ( a ^ (b << 3));
out[i] = a | b;
seed = (((seed << 7) ^ seed ^ out[i]) + 1792013);
热心网友
时间:2024-11-07 13:34
const uint8_t* in = (const uint8_t*)raw_in;
uint8_t* out = (uint8_t*)raw_out;
uint32_t seed = password ^ 0x7d7f92u;
for (size_t i = 0 ; i < len; ++i) {
uint8_t a = ( in[i] ^ seed ) >> 5;
uint8_t b = ( ( ((uint32_t)in[i]) << 20 ) ^ seed ) >> (20-3);
a &= 7;
b &= 248;
a = 7 & ( a ^ (b << 3));
out[i] = a | b;
seed = (((seed << 7) ^ seed ^ out[i]) + 1792013);