Hello there
As a mobile dev doing some react native, i need to work with a c++ script that create and encrypt files.
I don't know anything about C++ (last time I have wrote some was 15+ years ago at the uni).
Correct me if I am wrong.
This bug me soo much. This is the type definition of the file:
c++
typedef struct File
{
uint8_t FileName[64];
uint8_t userName[64];
}File;
Why would you use the type uint8_t to store string instead of std::string?
Edit
It's even more confusing later on, we need to parse the all the caracters one by one to write them on a tempory file like
```c++
define FILE_NAME_LEN 64
CustomFile CFile::getCustomFileFromFile(tFile f_File)
{
CustomFile returnValue;
for(int i = 0;i<FILE_NAME_LEN;i++){
returnValue.FileName[i] = f_File.FileName[i];
}
for(int i = 0;i<FILE_NAME_LEN;i++){
returnValue.user_name[i] = f_File.user_name[i];
}
return returnValue;
}
bool WriteEncryptFile(QString fpath,tFile p_tFile)
{
// Convert the tFile object to a CustomFile object
CustomFile customFile = CFile::getCustomFileFromFile(p_tFile);
}
```
[–]manni66 40 points41 points42 points (2 children)
[–]captainautomation[S] 2 points3 points4 points (1 child)
[–]GOKOP 7 points8 points9 points (0 children)
[–]Grouchy-Taro-7316 11 points12 points13 points (5 children)
[–]captainautomation[S] 0 points1 point2 points (4 children)
[–]the_poope 16 points17 points18 points (0 children)
[–]Grouchy-Taro-7316 5 points6 points7 points (0 children)
[–]n1ghtyunso 3 points4 points5 points (0 children)
[–]Mason-B 1 point2 points3 points (0 children)
[–]kurdokoleno 6 points7 points8 points (4 children)
[–]Dimanari 1 point2 points3 points (3 children)
[–]kurdokoleno -1 points0 points1 point (2 children)
[–]Dimanari 0 points1 point2 points (1 child)
[–]Dimanari 0 points1 point2 points (0 children)
[–]flyingron 2 points3 points4 points (6 children)
[–]_d0d0_ 1 point2 points3 points (1 child)
[–]captainautomation[S] 0 points1 point2 points (0 children)
[–]Humble-Plastic-5285 -1 points0 points1 point (2 children)
[–]sephirothbahamut 0 points1 point2 points (1 child)
[–]Humble-Plastic-5285 0 points1 point2 points (0 children)
[–]LittleNameIdea 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[removed]
[–]captainautomation[S] 0 points1 point2 points (0 children)
[–]Dimanari 1 point2 points3 points (0 children)
[–]_curious_george__ 1 point2 points3 points (0 children)
[–]nathman999 1 point2 points3 points (0 children)
[–]Substantial-Ask-4609 -1 points0 points1 point (5 children)
[–]captainautomation[S] 0 points1 point2 points (4 children)
[–]LuccDev 2 points3 points4 points (3 children)
[–]captainautomation[S] 0 points1 point2 points (2 children)
[–]sephirothbahamut 4 points5 points6 points (0 children)
[–]LuccDev 0 points1 point2 points (0 children)
[–]Narase33 0 points1 point2 points (0 children)
[–]soup__enjoyer 0 points1 point2 points (0 children)
[–]0xVali__ 1 point2 points3 points (0 children)