2
0
mirror of https://github.com/tenrok/Rfid-Credential-Provider.git synced 2026-05-21 13:24:13 +03:00
Files
rfid-credential-provider/Provider/RfidCredentialProvider/Encryption.cpp
T
2012-02-26 13:07:01 -08:00

8 lines
229 B
C++

#include <string>
void decrypt(char* toDecrypt, char* password){
for(int i = 0; i < strlen(toDecrypt); i++){
toDecrypt[i] = (char)(((int)toDecrypt[i]) - 1);
toDecrypt[i] = toDecrypt[i] ^ password[i % strlen(password)];
}
}