C# :: Creating Encryption Program Like TrueCrypt?
Feb 8, 2014
Is it possible to encrypt a folder and put it in a file container. Would I need to store the header key and other stuff my self or do the encryption methods take care of it? I am just getting into file input/output. I am just looking to make a simple console based one.
View 5 Replies
ADVERTISEMENT
Mar 19, 2015
this program on how to make a encryption and decryption program of a txt file
#include "stdafx.h"
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
[Code].....
View 1 Replies
View Related
Aug 5, 2014
Back again with a random bug that I can't seem to track down. My error is in my main.cpp file. I get a C2248 error on line 54, there I'm doing:
t.makeEmpty(t.root)
I know why, because it's a private member...but it should have access in so far as everything is concerned. I double checked my makeEmpty code and it's good to go so far as I can tell. I can't quite iron out where the disconnect is.
V/R
Brad
main.cpp
#include <iostream>
#include <string>
[Code].....
View 4 Replies
View Related
Sep 29, 2013
I am having trouble with an assignment. The assignment consists of a basic encryption and decryption program already written for me, I just have to write the encryption function. What we have to get the program to do is enter an integer and a text, and get the program to increment each letter in the text by the integer given. I did this by using a for loop and incrementing each value in the string by the integer.
However, I still can't get it to decrypt and I need the program to work with only a-z letters (if I increment each letter by 3 and I have the letter Z, it should go to Z+3 = C).
I attached the description of the attachment and below are the codes: The first file does not need to be edited.
Code:
/*******************Programming Assignment 1***************/
/****************Caesar's substitution cipher**************/
/*****************YOU MUST NOT EDIT THIS FILE**************/
/****Substitute alphabets in a string using rotation key***/
/****Leave all other characters unchanged******************/
/****Confirm correct encryption by decrypting**************/
[Code] ......
View 1 Replies
View Related
Jul 22, 2014
I am trying to make a simple program for encrypting a char* with the XOR operator. The code compiles and links perfectly, but I get an Access violation runtime error:
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <fstream>
using namespace std;
int main(int argc, char** argv) {
[Code] .....
Text that I am inputting:
My username is memberfunction.
View 9 Replies
View Related
Apr 18, 2014
Write a program to do simple encryption and decryption. Encryption basically means to convert the message into unreadable form. In this assignment, it should be done by replacing each letter of a message with a different letter of the alphabet which is three positions further in the alphabet. Then, all the letters will be reversed. Decryption is the process of converting encrypted message back into its original message. Your program should use the following shifting method.
Note: You must use array.
#include <iostream>
#include <string>
using namespace std;
[Code].....
View 2 Replies
View Related
May 31, 2012
I am currently using a byte encryption in C# which gets decrypted in my C++ client.
It is XOR, but I can't get it to work. Is there anything that Im doing wrong?
I already wrote the C++ XOR in C#, which look pretty much the same.
C#
Code:
public byte[] XOR(byte[] strng, byte[] key) {
int string_len = strng.Length;
int key_length = key.Length;
int i, position;
for (i = 0; i < string_len; i++) {
position = i % key_length;
[code]....
View 14 Replies
View Related
Apr 28, 2014
I need starting a do-while loop in my program that runs up to 10 time that asks the user to enter up to 10 scores, which include the slope and rating for the course, and calculates the handicap for each score.
Here's what I have so far:
Code:
{
//This program calculates a golfers handicap.
#include <iostream>
#include <string>
using namespace std;
[Code] ....
View 1 Replies
View Related
Mar 6, 2015
I am trying to create a border around my program. It looks like this: . I had to read a file in, which is in the attachment and produce the desired output in the image. I have produced the desired output, but without the border.
Here is my code thus far:
insert Code:
#include<stdio.h>
#include<Windows.h>
#define HEIGHT 21
#define WIDTH 78
int map[HEIGHT][WIDTH];
int i = 0, j = 0;
[Code] ....
View 2 Replies
View Related
Jan 15, 2013
I wanna create a DLL from my C++ program. My output of my C++ program is a text file called Centre_Cartouche.txt My output is two text files called brd.txt and sym.txt
At the beginning my program was just a main which contains all development (Main.cpp). Now I created function (in _Cartouche.h and _Cartouche.cpp).
My debugger tell me that the simulation works. But my file Centre_Cartouche.txt is not create.
_Cartouche.cpp_Cartou.hbrd.txtsym.txt
View 1 Replies
View Related
Jun 15, 2014
what i think i need to create 2 int for the FOR loop to do the encryption but how am i to do it meaning the actual encryption itself what is that i check with?Also i think i need more than just the #include <stdio.h> library due to the file functions that i will need or is C having them built in? Also what is that about the program doing all this from DOS?
Create 2 programs with the names encrypt and decrypt that will encrypt and decrypt files respectively.The encryption and decryption will be done through a command line of DOS and the program should be as follows: encrypt file1 file2 key and decrypt file1 file2 key
Where:
file1 is the source file
file2 is the destination file
key is the word with which we encrypt/decrypt file1
So when the user executes the command encrypt f1 f2 sunnyday the program will create a file with the name f2 which will have the contents of f1 encrypted with the key sunnyday.When the user executes the command decrypt f1 f2 sunnyday the program will create a file with the name f2 which will have the contents of f1 decrypted with the key sunnyday.
If the user gives a wrong key the program will continue to decrypt file1 but since the key is wrong the results will be unexpected.Finally the program must print the corresponding error messages in case of errors for example (There is no file 1).The program is expected to work corectly with not only plain text files but executable (exe) files etc.Also The program must be fully commented.
Note: The way the encryption will work is yours to choose but it is recommended that you encrypt every letter of the file with every letter of the key with the (start to finish and begin) technique meaning that if the key has 8 letters then the first leeter of the file will be encrypted with the first letter of the key, the second letter of the file with the second of the key, ..., the ninth letter of the source file with the first letter of the key, the tenth letter of the source file with the second letter of the key etc.
View 3 Replies
View Related
Aug 9, 2013
I just want to test AES from openSSL with this 3 modes: with 128,192 and 256 key length but my decrypted text is different from my input and I dont know why. Also, when I pass a huge inputs length (lets say 1024 bytes) my program shows `core dumped`... My input is always the same but it doesnt matter, at least for now. Heres the code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/aes.h>
int main(int argc, char **argv){
[Code] .....
View 1 Replies
View Related
Apr 28, 2013
I have been assigned a project by my teacher to make a program in c++ which will be able to encrypt a text file, a .docx file or a pdf document !!! Encrypting a text file is easy i have already done that but how do i encrypt a docx file or a pdf file ???
View 2 Replies
View Related
Oct 29, 2013
We need an AES Encryption/Decryption program in C for college lab (Educational) purpose . So we cannot use any "aes.h" file for this . We need a C program which simulate the purpose of AES
Input : Text (e.g: Anes P.A)
key (e.g:123op)
Output : Cipher Text using AES
I look this functionality done in a website : [URL] ....
Attached Images : AES.jpg (36.4 KB)
View 1 Replies
View Related
Mar 13, 2014
I just started learning the basics of programming. While encountering one of the practice problems in the book by Alex Allain I got a little confused. The question is as follows:
Write a menu program that lets the user select from a list of options, and if the input is not one of the options, reprint the list.
The author assumes you can answer this question only using if statements and/or loops (while, for and do).
This is the code I've written thus far:
Code: #include <iostream>
using namespace std;
int main()
{
int option;
char reset;
[Code] ....
For some reason, the nested while loop keeps repeating even when you input a valid option (1, 2 or 3). I can't seem to figure out why this happens.
View 4 Replies
View Related
Mar 8, 2013
I just started to work on a project which is 'Body Area Network'.
What I need to do is to take data from body with some sensor nodes and send it to mobile which would further send the data to a remote server, and I need to add some security (encryption/decryption) on the data.
So I want to know how to send data from mobile after encrypting it to the server and then decrypt it back(on server side).
View 6 Replies
View Related
Feb 14, 2012
I have the following function:
Code:
public static void Des(byte[] key, byte[] inBuf, byte[] outBuf) {
if (key.Length != 8 || inBuf.Length != 8 || outBuf.Length != 8) {
throw new Exception("Des: Buffer or key length incorrect.");
}
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
[Code] ....
I do not get the expected output of
Code: { 0x88, 0xBF, 0x0D, 0xB6, 0xD7, 0x0D, 0xEE, 0x56 }
instead I get
Code: { 0xC6, 0x61, 0x8D, 0x63, 0x0B, 0x39, 0x31, 0xB0 } am I doing something wrong?
I've even tried reversing the byte order of the test data, and I don't get the right result. I've tested the same data using C++ with CryptoPP on Linux, and I get the expected result, but I'm porting this code to run on .Net, and this is my main stoppage in the process at the moment.
View 5 Replies
View Related
Jul 14, 2013
while(!in.eof()) {
in >> ch;
char d = int(ch) + 10;
out << d;
[Code] ....
The first while loop would be to encrypt it, and the second would decrypt it, the decrypting is not giving the original content. For example:
in = Hello
encrypt...
decrypt...
out = Hellooo
View 2 Replies
View Related
Mar 1, 2013
so i need to encrypt a txt document using Caesar encryption. however i don't know how to open a txt and shift the keys into a new txt. the program has to ask the user for the number it should shift. Using arrays, if else. i also need to make a menu so i am using switch.
View 4 Replies
View Related
Sep 6, 2014
How to do encrypt and decrypt the text by using md5 algorithm without using the any library? Only implement in c++ program.
View 4 Replies
View Related
Sep 10, 2014
I am starting this project on how to encode and decode messages that are inputted, how to start this?
View 4 Replies
View Related
Aug 5, 2014
I'm creating a space simulator program for uni and I've got 3 errors that I just can't seem to fix.
View 10 Replies
View Related
Feb 17, 2014
I am working on writing a game that progresses from one "page" to the next. However, with the knowledge and experience I have right now I am only able to hardcode the "Pages" into the source code. I would like to learn how to put the pages into another file "default.pages" and have the program read the file and input the information into itself after I have compiled it. Then, if I change the pages file I simply have to restart the program instead of recompiling all of it. Someone said I should use XML and input it into an object and use that object, but I'm not sure how to do that yet.
I have 3 files right now:
main.cpp, pages.cpp, and pages.h.
//MAIN//
#include <iostream>
#include <string>
#include <fstream>
#include "pages.h"
using namespace std;
const Page gamePages[] = {};
[Code] ....
View 9 Replies
View Related
Jan 30, 2013
This is the problem in detail:
I have a VC++ project to create a DLL that will be used as a Plug-in in an external programm. This DLL uses some MFC functions. The initial configuration of the project was:
-Use of MFC: Use MFC in a Static Library
-Common Language Runtime support: No Common Language Runtime support
-Runtime Library: Multi-threaded Debug (/MTd)
This configuration worked fine, there were no compilation errors and the resulting DLL worked correctly.
The problem came when it was necessary to add to the DLL some functions of .NET, using the namespace System and similar. To do that, I had to change the Common Language Runtime support, to Common Language Runtime Support (/clr). Then, when I tried to compile, I got this message:
'/MTd' and '/clr' command-line options are incompatible
So I changed the Runtime Library to Multi-threaded Debug DLL (/MDd). Then I got this error message:
Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version
So I also changed the Use of MFC to Use MFC in a Shared DLL.
After this, the compilation was correct. Then logically the size of the generated DLL is smaller, but this new DLL does not work correctly, the external program in which this DLL is used crashes.
I don't know what to do to fix the problem. Maybe I need to add some other DLLs or files to the directory where the DLL is located, where the external program uses it. But I would prefer to include a single DLL file, but this seems to be incompatible with the use of .NET functionality.
View 11 Replies
View Related
Aug 9, 2012
I'm trying to create a program that creates random numbers. I looked through some examples and this is what I came up with. The time identifier seems to be undefined yet I see no reason it is undefined.
Code:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main() {
//Re-seed the random-number generator
time_t now;
[code]...
here's my error code..
1>------ Build started: Project: bake, Configuration: Debug Win32 ------
1> bake.cpp
1>c:usersjonbecherdocumentsvisual studio 2012projectsakeakeake.cpp(8): error C3861: 'time': identifier not found
1>c:usersjonbecherdocumentsvisual studio 2012projectsakeakeake.cpp(9): warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
View 2 Replies
View Related
Dec 3, 2013
Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int encrypt_data(FILE *);
[Code] ....
I am trying encrypt the file "encrypt" when I enter it I get "Error in reading file"
I think its a problem with the fgets() and scanf()...I tried both fgets out and then scanf but I get the same error.
I look in the directory and see that when I enter a file to be encrypted a blank file with a "?" at the end is created in the directory. so I try to encrypt "encrypt" it shows error then creates "encrypt?"
I then tested it by entering a random file name that does not exist
EXAMPLE
Please enter file to be encrypted: fakefilename
Error in reading file.
I look in the directory the non existent file now is listed "fakefilename"
View 1 Replies
View Related