Thread: Xor Encryption

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Xor Encryption


    Hi all ....i have a xor encryption file and the sender told me that :
    When you read it out it is crypted, with xor coding, 8 unfined hex value d2, subract 8bit unfined 4C then the file
    is a ordinary bin file.
    I dont understand what can i do to decrypt the file.
    pls someone help me
    Thanks in Advance
    Contrast
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,379
    Rep Power
    1871
    Well if by "unfined" you mean "unsigned", then perhaps

    Code:
    unsigned char c = a byte from your file
    c ^= 0xd2;
    c -= 0x4c;
    // write c to your new file
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    Salem thanks for your fast reply ...so i will must open the file with winhex or hexplorer or Notepad++ and what can i do to decrypt the file? Or if you have a better sugestion pls tell me it is very important for me.
    Thanks again
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    You're right Salem for your message on another forum but I'm trying to find a way that I can read the file ... I know it's very annoying guys like me to ask questions that may seem stupid to someone who knows.
    Thank you so much giving me immediately replied with the code should be put'll try to find a way to finish
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    I did finally with your help ... Thank Salem

IMN logo majestic logo threadwatch logo seochat tools logo