| | |
Encrypting Binary
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Is it possible to open a file in binary mode and make an array out of it then to encrypt that information. I guess I should ask how you would start something like that? Thanks
>That confuses me =(
Get used to it. Good programmers are in a constant state of confusion.
>Looks like i have some quasi specifics to investigate! Up Up And AWAY!
Get used to it. Good programmers are in a constant state of confusion.
>Looks like i have some quasi specifics to investigate! Up Up And AWAY!
Well your question is not quite clear but you can always use fopen command with :
“rb” Open a binary file for reading
“wb” Create a binary file for writing
“ab” Append to a binary file
“rb+“ Open a binary file for read/write
“wb+“ Create a binary file for read/write
“ab+“ Open a binary file for read/write
as modes to manipulate it.For more info try this.
“rb” Open a binary file for reading
“wb” Create a binary file for writing
“ab” Append to a binary file
“rb+“ Open a binary file for read/write
“wb+“ Create a binary file for read/write
“ab+“ Open a binary file for read/write
as modes to manipulate it.For more info try this.
I Surf in "C"....
This helps, but to clarify, instead of taking a string of charecters from a text file and throwing them into an array, is it possible to take that same concept but do it with binary? Thanks
>That confuses me =(
Get used to it. Good programmers are in a constant state of confusion.
>Looks like i have some quasi specifics to investigate! Up Up And AWAY!
Get used to it. Good programmers are in a constant state of confusion.
>Looks like i have some quasi specifics to investigate! Up Up And AWAY!
>This helps, but to clarify, instead of taking a string of charecters from a text file and throwing
>them into an array, is it possible to take that same concept but do it with binary? Thanks
Yes, but don't expect that you would be able to display them. A binary file is a stream of unformatted character. That is, it is raw and does not follow ASCII standards. Hence your terminal won't be able to display it. But it sure can be dumped into a char array.
>them into an array, is it possible to take that same concept but do it with binary? Thanks
Yes, but don't expect that you would be able to display them. A binary file is a stream of unformatted character. That is, it is raw and does not follow ASCII standards. Hence your terminal won't be able to display it. But it sure can be dumped into a char array.
C++ Syntax (Toggle Plain Text)
fstream f("asdf.dat"); char* arr=new char[ sizeof file]; f.read(reinterpret_cast<char*>(arr), size of file);
Last edited by siddhant3s; Jun 4th, 2009 at 1:01 am.
Siddhant Sanyam
(Not posting much)
My Blog: Yatantrika
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
(Not posting much)
My Blog: Yatantrika
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
C++ Syntax (Toggle Plain Text)
char* arr = new char[...]; f.read(reinterpret_cast<char*>(arr), ...
![]() |
Similar Threads
- Recursive binary search (C)
- Writing a string to binary (C++)
- decimal > binary > Oct > Hex (C++)
- binary file (C)
- Encrypting a Visual Basic application (Visual Basic 4 / 5 / 6)
- ASCII to BINARY, & VICA VERCA (C++)
Other Threads in the C++ Forum
- Previous Thread: Global pointer loses its' values
- Next Thread: DirectX in Visual C++: Help moving a mesh starting from BasicHLSL Tutorial
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






