i have an executable that is encrypted; it is made in Visual C++. decrypt it? what i must to look for? I have some kind of files (.req extention) that have the content encoded by password type.
I have got to create a program that will gather input from the user and then encrypt & decrypt those characters.
I'm not very confident at coding so I'm sure many parts of my code are written poorly and not following the best practice so I have written a simple version of an algorithm where the program simply adds/subtracts a value of 2 to/from the ASCII values but I have discovered the use of the rand() and srand functions but I'm unsure how to go about using them within both my encrypt and decrypt function as a single value (static variable?).
I have an application which needs to connect to a database. It runs in the background so there is no user input. I therefore need to store the connection string. I want to encrypt the connection details and then store the encrypted information. My thinking is I would read the encrypted details, from wherever I store them, unencrypt them and then connect to my database.
I've done a bit of reading on this and the SHA1CryptoServiceProvider method seems like an option but it appears that this cannot be unencrypted.
How can decrypt the file that the program below encrypt?
// This program encrypts a file #include<iostream> #include<fstream> using namespace std; int main() { const int ENCRYPT=10; // amount to add to a chor const int SIZE= 255; // array size
I have been working on some C++ code that doesn't seem to be going right. I'm wanting it to read a (three-digit) integer representing the value to be encrypted, a (one-digit) integer representing the encryption key, encrypt the value and print the encrypted value. The encrypting method used is that each digit in the given number is replaced by ((the sum of that digit plus key) modulo 10) then the first and last “encrypted” digits are swapped.
For example, if the number entered was 216 and the key given was 7, after applying the encryption procedure described the first digit (2) would become 9, the middle digit (1) would become 8 and the last digit (6) would become 3. The first and last encrypted digits are then swapped. The program displays the encrypted number: that is 389 in this case.
#include <iostream> using namespace std; int main() { int isolateDigits(); int replaceDigits(); int swapDigit1withDigit3();
I'm very new to MFC & VisualC++. I'm using MSVS2010 Pro. I am trying to write/debug a simple form that saves and restores the content of some edit controls. It seems to work as expected, except the file saves only to the Project Folder, regardless of where I browse and select to save the file.
Code: void CMFC_FileDialogDlg::OnBnClickedbtnsave() { this->UpdateData(); CFile f; //Kinda Correct, Works but still saves in Project Folder BOOL b_OpenFileDialog = FALSE;//this doesn't act as bool in CFileDialog?
[Code] ....
My only experience is a little simple VB programming in Excel, so any specific examples??? Also, rules seem to change from version to version? I have to "update" a number of undocumented programs.
I need to develop an application in VC++ that will take .WAV files as an input and identify if there is a Gun shot in that wave file. WAVE file with gunshot must be having certain paramaters like frequency, bit rate etc which I don't know right now. But is there a way in VC++ to develop a program that can recognize gunshots by comparing that .WAV file with certain parameters?
I created a new project in Qt Creator, the files included are the .Pro file, and the .Cpp file.
Qt does not recognize the headers I try to reference in the .Cpp file. I am pretty sure it's because of what I don't have in my .Pro file. What do I add to it?
.Cpp
Code: #include <QApplication> ->No such File or Directory #include <QPushButton> ->No such File or Directory #include <QHBoxLayout> ->No such File or Directory int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget *window = new QWidget;
I'm trying to build libglib using MSVC. libglib doesn't use dllexport - so to create usable DLLs it needs to generate a .DEF file. It does this by using a .symbols file. Here's a cut-down example:-
Code: /* This file lists all exported symbols. It is used to generate the glib.def file used to control exports on Windows.*/
/* glib.symbols */ g_mkdir_with_parents
#ifdef G_OS_WIN32 g_file_get_contents_utf8 #endif
The following commands would produce the following files called glib.def
Problem:- Although I can run the macro as a pre-build step (and it does produce conditional entries in the generated .DEF file) it DOESN'T produce the word EXPORTS at the top of the file. So the linker then fails to recognise it as a valid .DEF file.
How can I add that word EXPORTS to the top of the generated file? I tried just adding EXPORTS to the top of the symbols file but that didn't work. I also tried this variation on the macro:-
I am currently writing a program that grabs information from a .dat file. When I go to debut I get this error.
Code: #include <iostream> #include <string> #include <fstream> using namespace std; // function step 1 - declare the prototypes void sort(int n); // catches an integer number from the call void swap(string *p1, string *p2); //catches the location of data in ram
I am developing a CFormView MFC app. When I go to click something on the menu, it takes awhile before the event happens. The project is build optimized in release mode. I have 3 additional threads and I thought they might be blocking the internal MFC framework stuff, but I use the Sleep() call in each thread to yield to the MFC main app.
I have written code that saves a matrix to a utf-8 file. This code works just fine when invoked from a win32 console app, but if I attempt to use the exact same code by invoking it within a SDI Doc/View Serialize(CArchive& ar), if(ar.IsStoring), it fails, but in a somewhat unusual manner. Namely, the file shows up in the designated directory, but it is an empty file (0 bytes), and the 'Unable to open file' message is seen in Debug config. Note that both the win32 console app and the SDI app are both using a Unicode character set, however, only the SDI app uses the method inside a Serialize(CArchive& ar) method, whereas the win32 console app evokes the save method directly from within _tmain. Why this seemingly illogical disparity occurs.
Here's the template code I have used in innumerable applications to save matrices to a disk file.
Code: namespace TNT { // saves a TNT double matrix, discriminating between real and complex matrices by virtue of the respective file markers, 'MATCALC94R' and 'MATCALC94C'. template <class T> void SaveRealBMatrix(const Matrix<T> &M, string sfilename) { _RPT0(0, "SaveRealBMatrix: "); _RPT1(0, "sfilename =: |%s|
[Code] ....
Here's the code from the SDI document Serialize(CArchive& ar) that fails as described above. Note that m_M is a class member TNT::Matrix<double> m_M that has been verified to exist in the Serialize method.
The program then asks the user for a search string, which may contain white space. The program should search the file for every occurrence of the search string. When the string is found, the line that contains it should be displayed in the following format
nnnnn:Line Contents
That is the line number of the line, 5 columns wide, right justified, followed by a colon, followed by the contents of the line.
And this is what I've got so far:
Code: #include<iostream> #include<fstream> #include<string> #include<iomanip> using namespace std; int main(int argc, char *argv[]) { ifstream inFile; string fileName,
[code]....
But this doesn't work. It prints everything in the file, not just the lines where the string is found.
I have a jpg file. I have extracted the width and the length of the image. I have done that with some codes and markers. Now I need the image data starts as from that place i would like read the data and print the pixel value. I would like to display the pixels later.
I have a project that has a few .asm files (assembly language code), I have the compiler/assembler set to create a list file for the assembly code and would like the debugger to use the .lst file for the source instead of the .asm files because in the .asm files the macros are not expanded like they are in the .lst files which makes debugging difficult sometimes.