Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to encrypte with C

  1. Sep 13, 2007 #1
    i am getting started with the C language. I've not yet learnt about much things but am so interested with programming and am wpndering if it is possible to encrypt using c language?
  2. jcsd
  3. Sep 13, 2007 #2
    encryption is not really built into any language that I know of, you cant 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
  4. Sep 13, 2007 #3
    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.
  5. Sep 13, 2007 #4
    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.
  6. Sep 13, 2007 #5
    Your university should have some computer science courses -- can you get their notes?
  7. Sep 13, 2007 #6
  8. Sep 13, 2007 #7


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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
  9. Sep 13, 2007 #8


    User Avatar
    Science Advisor

    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).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for encrypte
Pseudo Random Encryption?