Thread: File Encryption

  1. #16
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Jack Walters View Post
    So, what if I wanted to use hashes to encrypt files? Only problem is, I cant decrypt them.
    To me, hashes are a method to "checksum" a file to ensure it hasn't been tampered with. That can be used in conjunction with encryption if you want, e.g. in the encrypted file, add another x bytes that is the md5sum of the file [or whatever hash you want to use].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  2. #17
    Registered User
    Join Date
    Nov 2007
    Posts
    9
    Okay, I just am familiar with hashes being used to encrypt passwords.

  3. #18
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Jack Walters View Post
    Okay, I just am familiar with hashes being used to encrypt passwords.
    Yes, that's a common way to "store" passwords. Since the hashing method "looses" some data irretrievably, you can't just reverse calculate the value to get the original password.

    You could of course hash the password the user gives you and use that as the actual XOR key, for example.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  2. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  3. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM
  4. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM