Secure enrcyption function
-
Found this great code for encryption in our codebase. All of the client's extremely sensitive information is being stored locally using this.
string Encryption::EncryptString(string dat) {
string n = "qwertyuiopasdfghjklzxcvbnm"
n += n + n + n + n; //keeps the full string from appearing in string table
for (size_t i = 0; i < dat.size(); i++) {
dat[i] ^= n[i];
}
return dat;
}And it gets even better when you see the decrypt function:
string Encryption::DecryptString(string dat) {
return EncryptString(dat); //xor is reversible
} -
Found this great code for encryption in our codebase. All of the client's extremely sensitive information is being stored locally using this.
string Encryption::EncryptString(string dat) {
string n = "qwertyuiopasdfghjklzxcvbnm"
n += n + n + n + n; //keeps the full string from appearing in string table
for (size_t i = 0; i < dat.size(); i++) {
dat[i] ^= n[i];
}
return dat;
}And it gets even better when you see the decrypt function:
string Encryption::DecryptString(string dat) {
return EncryptString(dat); //xor is reversible
}Superb. Microsoft should remove the System.Security.Cryptography as soon as possible. ;P
-
Found this great code for encryption in our codebase. All of the client's extremely sensitive information is being stored locally using this.
string Encryption::EncryptString(string dat) {
string n = "qwertyuiopasdfghjklzxcvbnm"
n += n + n + n + n; //keeps the full string from appearing in string table
for (size_t i = 0; i < dat.size(); i++) {
dat[i] ^= n[i];
}
return dat;
}And it gets even better when you see the decrypt function:
string Encryption::DecryptString(string dat) {
return EncryptString(dat); //xor is reversible
} -
Found this great code for encryption in our codebase. All of the client's extremely sensitive information is being stored locally using this.
string Encryption::EncryptString(string dat) {
string n = "qwertyuiopasdfghjklzxcvbnm"
n += n + n + n + n; //keeps the full string from appearing in string table
for (size_t i = 0; i < dat.size(); i++) {
dat[i] ^= n[i];
}
return dat;
}And it gets even better when you see the decrypt function:
string Encryption::DecryptString(string dat) {
return EncryptString(dat); //xor is reversible
}Oh Horror of Horrors... This one is certainly one of the best. I don't think it could have been any worse if it had been written in vbscript.
I wasn't, now I am, then I won't be anymore.
-
Found this great code for encryption in our codebase. All of the client's extremely sensitive information is being stored locally using this.
string Encryption::EncryptString(string dat) {
string n = "qwertyuiopasdfghjklzxcvbnm"
n += n + n + n + n; //keeps the full string from appearing in string table
for (size_t i = 0; i < dat.size(); i++) {
dat[i] ^= n[i];
}
return dat;
}And it gets even better when you see the decrypt function:
string Encryption::DecryptString(string dat) {
return EncryptString(dat); //xor is reversible
} -
Found this great code for encryption in our codebase. All of the client's extremely sensitive information is being stored locally using this.
string Encryption::EncryptString(string dat) {
string n = "qwertyuiopasdfghjklzxcvbnm"
n += n + n + n + n; //keeps the full string from appearing in string table
for (size_t i = 0; i < dat.size(); i++) {
dat[i] ^= n[i];
}
return dat;
}And it gets even better when you see the decrypt function:
string Encryption::DecryptString(string dat) {
return EncryptString(dat); //xor is reversible
} -
I have tried your suggestion for encrypting and decrypting but it keeps giving me errors when I try to play the code. I really need this to work ASAP as it is a very important project for me!!!
return 5;
-
Found this great code for encryption in our codebase. All of the client's extremely sensitive information is being stored locally using this.
string Encryption::EncryptString(string dat) {
string n = "qwertyuiopasdfghjklzxcvbnm"
n += n + n + n + n; //keeps the full string from appearing in string table
for (size_t i = 0; i < dat.size(); i++) {
dat[i] ^= n[i];
}
return dat;
}And it gets even better when you see the decrypt function:
string Encryption::DecryptString(string dat) {
return EncryptString(dat); //xor is reversible
}As long as you hide the key well, and use it only once... :D
-- Kein Mitleid Für Die Mehrheit
-
Found this great code for encryption in our codebase. All of the client's extremely sensitive information is being stored locally using this.
string Encryption::EncryptString(string dat) {
string n = "qwertyuiopasdfghjklzxcvbnm"
n += n + n + n + n; //keeps the full string from appearing in string table
for (size_t i = 0; i < dat.size(); i++) {
dat[i] ^= n[i];
}
return dat;
}And it gets even better when you see the decrypt function:
string Encryption::DecryptString(string dat) {
return EncryptString(dat); //xor is reversible
}You know, this function is so great that it will crash the application if "dat" is long enough (longer than 130 symbols).