2
0
mirror of https://github.com/tenrok/Rfid-Credential-Provider.git synced 2026-05-15 11:59:44 +03:00
Files
rfid-credential-provider/Provider/RfidCredentialProvider/Encryption.cpp
T
2019-11-29 15:55:40 +03:00

8 lines
232 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)];
}
}