MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / Encrypt

Method Encrypt

src/Encryption.cpp:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44char* 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
56char* Encryption::Decrypt(const char * key, int keysize, const char * data, bool addZero) {
57 int size = strlen(data);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected