However, if the security depends on the secrecy of the algorithm rather than on the secrecy of the key, perhaps it is broken to begin with.Quote:
I can't for security reasons (the software is for website security).
Printable View
However, if the security depends on the secrecy of the algorithm rather than on the secrecy of the key, perhaps it is broken to begin with.Quote:
I can't for security reasons (the software is for website security).
Point taken, but I would rather protect both.
. . . Anyone?
What's the question now? How to copy a string to a buffer?Quote:
Originally Posted by JasonBB
Is that it?Quote:
Originally Posted by JasonBB
Basically, in this line:
I need to use a string instead of the vector<char>, somehow, but the function cannot take a string. i.e. If you look at the code posted on the previous page, I need a way to do this:Code:file_out.write(&buffer[0], x);
I was thinking perhaps there was a way to put the string back into the buffer variable, but I don't know.Code:file_out.write(mystring, x);
write() takes a const char * as the first parameter ... use std::c_str()
member function:
Code:
file_out.write(mystring.c_str(), x);
I truly thank you guys for helping me out on this. The function seem to be working great-- I am just making some small tweaks to the code to make it fit in better with the rest of the program.
Once again, thank you.