| 42 | } |
| 43 | |
| 44 | char* Encryption::Encrypt(const char * key, int keysize, const char * data, int size) { |
| 45 | if (size == -1) |
| 46 | size = strlen(data); |
| 47 | |
| 48 | char * encdata = DES_encrypt(key, keysize, data, size, false, DES_ENCRYPT); |
| 49 | if (!encdata) |
| 50 | return NULL; |
| 51 | char * hexData = SU::DataToHex(encdata, size); |
| 52 | delete [] encdata; |
| 53 | return hexData; |
| 54 | } |
| 55 | |
| 56 | char* Encryption::Decrypt(const char * key, int keysize, const char * data, bool addZero) { |
| 57 | int size = strlen(data); |
nothing calls this directly
no outgoing calls
no test coverage detected