Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,561 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,904 people online right now. Registration is fast and FREE... Join Now!




Encryption Headachs

 
Reply to this topicStart new topic

Encryption Headachs

code_monster
10 Apr, 2008 - 05:14 PM
Post #1

New D.I.C Head
*

Joined: 19 Mar, 2008
Posts: 5


My Contributions
Hey, I've got a bit of a problem. So, I've found an algorithm and I know the theory behind how to encrypt text using RSA Encryption.What I really need though is to apply the encryption to a file. I have no idea where to start. Anyone have any ideas to set me on the right track?

Oh ya, and its got to be done in C++, sorry, I forgot to add that.
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: Encryption Headachs
11 Apr, 2008 - 02:45 AM
Post #2

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,539



Thanked: 98 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
Try this link.

It's an example of the RSA algorithm smile.gif
User is offlineProfile CardPM
+Quote Post

code_monster
RE: Encryption Headachs
11 Apr, 2008 - 05:22 AM
Post #3

New D.I.C Head
*

Joined: 19 Mar, 2008
Posts: 5


My Contributions
THanks, that helps with the part about getting it to work, bu how do I apply that encryption to a file?
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: Encryption Headachs
11 Apr, 2008 - 10:18 AM
Post #4

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,539



Thanked: 98 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
fstream is used to work with files in C++

Basically, you would want to open the file, read all the contents in as a string, convert it to the values that you need to encrypt it to, and write to another file.

I'm working on an encryption program at the moment, so if you want any help I can help you using mine as an example (it doesn't use RSA though, so you'd have to substitute my algorithm for yours smile.gif)
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 11:39PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month