C Language Encryption Tutorial: Beginner Guide

  • Thread starter Thread starter kthouz
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
7 replies · 3K views
kthouz
Messages
188
Reaction score
0
Hello!
i am getting started with the C language. I've not yet learned about much things but am so interested with programming and am wpndering if it is possible to encrypt using c language?
 
Physics news on Phys.org
encryption is not really built into any language that I know of, you can't do like var.encrypt. encryption has to do with the programmer, so if you get good enough sure you can encrypt,just as you can with any language
 
kthouz said:
Hello!
i am getting started with the C language. I've not yet learned about much things but am so interested with programming and am wpndering if it is possible to encrypt using c language?

Learning to program takes time, and when you've properly learnt, you can program in any language: C, C++, Java, Python, Haskell, Oz, Prolog, Mercury, people in a business organisation, stones in a long row, raw assembler, etc. It's all the same. But it does take quite a few years of practise and meditation to get there -- like all skills, it's worth learning because it's non-trivial.

Encryption is also a deep subject, and there's no such thing as just "encrypting" something: there are variations, suitable for different purposes, etc. As already noted, encryption can be done in any language: people used to encrypt things with a long piece of paper helically wound about a pencil...

If you're serious about computing and programming, try to follow a university course instead -- most universities tend to put their course notes online. Like all things, self-learning is all well and good, but it's easy to get stuck on trivial things and miss out whole chunks of important stuff.

Good luck.
 
Thanks for your support.
So if you know any website where i can get notes would you let me know?
actualy am student in Physics so you see am not well placed but coz i like programming i think that i can figure it out during my free time with some good supports like you did.
 
Your university should have some computer science courses -- can you get their notes?
 
las3rjock said:
You will want to obtain a copy of Applied Cryptography by Bruce Schneier.

Seconded. This is really all you need to get started with cryptography, with any language. The examples provided are in C, though, so it'll be even more useful to you.

- Warren
 
B-80 said:
encryption is not really built into any language that I know of, you can't do like var.encrypt. encryption has to do with the programmer, so if you get good enough sure you can encrypt,just as you can with any language

But there are encryption libraries. C# (and any .NET language) for example has system.net.cryptography (or something like that) with implementations of popular algorithms such as SHA1 and Rijndaels, which are very easy to use. There are also some static classes in the framework that make it as simple as StaticClass.Encrypt(<algorithm>, text).