|
@@ -213,14 +213,25 @@ Php::Value MainLogic::php_decrypt_wrapper(Php::Parameters ¶ms ) {
|
|
|
return ret_object;
|
|
|
}
|
|
|
ret_object["success"]="true";
|
|
|
- ret_object["fields"]=Php::Array(plaintext_fields_list);
|
|
|
- printf("Returning back to good old php.\n"); fflush(stdout);
|
|
|
+ no_of_fields = plaintext_fields_list.size();
|
|
|
+ std::vector<unsigned char> temp_vector;
|
|
|
+ Php::Array ret_php_array;
|
|
|
+ for(counter=0; counter<no_of_fields; counter++)
|
|
|
+ {
|
|
|
+ temp_vector = plaintext_fields_list[counter];
|
|
|
+ ret_php_array[counter] = std::string((char*) &temp_vector.front(), (ssize_t) temp_vector.size());
|
|
|
+ }
|
|
|
+ ret_object["fields"]=ret_php_array;
|
|
|
+
|
|
|
for (auto binaryField : plaintext_fields_list)
|
|
|
{
|
|
|
+
|
|
|
for(auto myByte : binaryField)
|
|
|
printf("%c", myByte);
|
|
|
printf("\n");
|
|
|
}
|
|
|
+ printf("Returning back to good old php.\n"); fflush(stdout);
|
|
|
+
|
|
|
return ret_object;
|
|
|
}
|
|
|
|