-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathGetNextChar.cpp
More file actions
43 lines (33 loc) · 785 Bytes
/
Copy pathGetNextChar.cpp
File metadata and controls
43 lines (33 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "stdafx.h"
#include "chess.h"
#include "data.h"
void get_Xor_Char(char* orgChar, int seed, char* nowChar){
int len = (int)strlen(orgChar);
for(int i = 0; i < len; i++){
nowChar[i] = orgChar[i] ^ 0x77 ^ (seed * seed);
nowChar[i] = (ABS(nowChar[i] * seed * 13 / 7) & 0xff);
//if(nowChar[i] < 0x20 || nowChar[i] > 0x5d){
// if(i < len - 2){
// nowChar[i] = orgChar[i+1];
// }
// else{
// nowChar[i] = orgChar[i-5];
// }
//}
//if(nowChar[i] < 0x20){
// nowChar[i] += 0x20;
//}
//else if(nowChar[i] > 0x5d){
// if(i < len - 2){
// nowChar[i] = orgChar[i+1];
// }
// else{
// nowChar[i] = orgChar[i-5];
// }
//}
//else {
// nowChar[i] = nowChar[i] ;
//}
}
}
//if(XOR_CHAR_2[i] < 0x20 || XOR_CHAR_2[i] > 0x5d){