I tried to use the DamgardJurik encryption (not exactly follow the documentation, just to test encryption and decryption now), the code is as follows:
include
include <libscapi/include/mid_layer/DamgardJurikEnc.hpp>
int main(int argc, char* argv[]) {
// create a DamgardJurik encryption object
DamgardJurikEnc encryptor;
// generate a key pair using the object
DJKeyGenParameterSpec spec(128, 40);
auto pair = encryptor.generateKey(spec);
encryptor.setKey(pair.first, pair.second);
DJPaillierExamples.cpp: In function ‘int main(int, char**)’:
DJPaillierExamples.cpp:15:43: error: no matching function for call to ‘DamgardJurikEnc::generateKey(DJKeyGenParameterSpec&)’
auto pair = encryptor.generateKey(spec);
Actually the code inspection noticed: "No matching member function for call to "generateKey", candidate function not viable: requires 0 arguments, but 1 was provided."
I am not sure whether I used it correctly. Any advice would be appreciated. Thank you.
I tried to use the DamgardJurik encryption (not exactly follow the documentation, just to test encryption and decryption now), the code is as follows:
I compile the code, but received an error:
Actually the code inspection noticed: "No matching member function for call to "generateKey", candidate function not viable: requires 0 arguments, but 1 was provided."
I am not sure whether I used it correctly. Any advice would be appreciated. Thank you.