#include <stdio.h> #include <stdlib.h> #include <string.h> #define KEY 0x86 int main() { char p_data[16] = {"20183125уер╒"}; char Encrypt[16]={0},Decode[16]={0}; int i; for(i = 0; i < strlen(p_data); i++) { Encrypt[i] = p_data[i] ^ KEY; } for(i = 0; i < strlen(Encrypt); i++) { Decode[i] = Encrypt[i] ^ KEY; } printf("Initial date: %s\n",p_data); printf("Encrypt date: %s\n",Encrypt); printf("Decode date: %s\n",Decode); return 0; }
标签:加密,16,XOR,Decode,KEY,printf,Encrypt,data From: https://www.cnblogs.com/zhangyaoMangR/p/17128837.html