Encryption algorithm [closed] - c++

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Do you know a good encryption algorithm that isn't too difficult to implement in c++ (but neither too easy)?

Look at this wonderful comics on AES. It explains the cryptographic background of the algorithm and you can practice by writing a high-performance implementation of one in different languages.

I think RSA is good as well as pretty much straightforward to implement. You might want to look into it. Another one I would be suggesting which is also straightforward is DES.
Rivest, Shamir and Adleman (RSA)
Data Encryption Standard (DES)

If you're just looking for something to code up for the learning experience, I've always liked the Advanced Encryption Standard. The actual standard document at NIST provides all the detail you need to write and test your code.

I like RC5 for its simplicity. Much easier to implement than e.g. AES, and while not quite as strong, it is still a good cypher.

Related

What is Bison and why is it useful? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have been programming for a few years now and have seen the name Bison in passing, but never bothered to ask why it is or why it might be needed. How can Bison effect how I program, can it make my C/C++ code faster?
Bison is a parser generator. It takes it's input in something similar to Backus-Naur notation and outputs code to parse input according to that grammar. It lets you write a parser more easily than you would otherwise. Instead of having to do everything manually, you only have to specify the rules of your grammar and what you want to happen when it matches one of the rules.
GNU Bison is the only Bison related to programming I know of. It won't make your code faster, and it's possible that you won't ever need it in your life. However, learning some compiler theory, or even writing a simple compiler yourself, is a terrific learning experience that does affect the way you program, the way you think about computer programming, and a lot of things like that. If you enjoy formal languages and automata, you'll enjoy compiler theory; if you dislike theory in general, it's probably not for you. If you're interested, there are lots of questions about starting books on Stackoverflow.
Oh and, once in a while a programmer does need some more complicated parsing work and suchlike, and it's a huge boon to know about parser generators, instead of writing everything by hand, following a naive approach.

Parsing HTTP request streams with C++: any not state machine way with same speed or better? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
So we have some simple request/response parsers. thay are bacically simple state machines that could be esely created in pure C code. I wonder what is C++ way to parse HTTP 1.0+ requesrt/response streams that would be as fast or faster than C analogs yet would be sweeter from code prespective?
Rather than coding up explicit state machines, you could probably use Spirit.Qi to build a parser for the data. This generally gives rather slow compilation, but execution that's quite competitive.
You might want to look at a previous answer by #sehe for some inspiration on parsing binary data with Spirit.

Examples of Design Patterns used in FOSS [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I've read a lot of good things written about design patterns but am yet to actually look at things in detail. To me, design patterns is just a fancy name for data structures and algorithms. Before I invest any time in more reading, I'd like to see some good examples of design patterns working in real life.
What good examples of design patterns can I find in well-known open source projects?
C++ preferred.
Update: I see the close votes and downvotes. These were expected. If there is an alternative post with answers to my question, please lead me to it. At least leave a reason as to why this post doesn't belong here.
It appears you did not invest enough time into design patterns to truly grasp what they are. I encourage you to read more, because design patterns are not a fancy name for data structures and algorithms; there is barely any link between algorithms and design patterns. Design patterns are "recipes" that help you organize classes and their relationships in a way that makes them easier to reuse.
As for examples, no need to look very far: the STL collection iterators are implementations of the iterator pattern.

How to encrypt a text [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I need to implement a simple text encryption in C++ without using any existing framworks. This is purely for educational purpose to learn the in-and-outs and to learn the way to implement such a system. I am not planning to implement this in production code. I can use Windows APIs but it won't be cross platform. I am trying to learn something can work across multiple platforms. the best way to implement this is implement using C/C++. Please share good resources or links in this regard.
Depending on what you actually want, you could look at the CipherSaber project: instructions to implement your own RC4 encryption code for a simple IV+text format.
However this is an academic exercise only: you should never use your own crypto code in production unless you really know what you're doing. You could also read Schneier's Applied Cryptography for a good introduction to all of this stuff.

API for C/C++ programs. Which technique? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
Please, could you explain, which technique is common for developing API for C/C++ programs?
One example is sockets. And what else?
Thanks...
Have a look at the APIs standardised by the Khronos Group. They have a well-established convention of defining library interfaces in a concise way.
No, they probably don't hold the Guiness record for "Most convenient API", but they indeed could have one for "Most consistent API stanard", "Best legacy API deprecation model" or something of those sorts.
One example of such API is the OpenGL's.
Don't develop your own system API. There's plenty of documentation on them already.