1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to password protect a PDF or WORD document with key codes

Discussion in 'Programming' started by tyankee, Jan 7, 2016.

  1. #1
    What i'm looking to find out is if there is a way to set up a unique key code for every WORD or PDF document that i have people download. It would work something like the OFFICE or QUICKEN key codes. They would have to enter the key code once to access the document and it would be tied to them. They could not give it to anyone else or if it was hacked it could not be used without a key code. These key codes would be specific to one person, one computer (or maybe some other criterea like IP address). Is there software to do this? or add-ons?
     
    tyankee, Jan 7, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    It's probably possible, but when the user have the document, nothing stops the user from just copying the content into a new file, hence the whole password idea is a bit useless. I would rework the concept a bit, for instance have a user Login or something that will give that user access to the content.
     
    PoPSiCLe, Jan 8, 2016 IP
  3. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #3
    If you are using PHP, many libraries offer the user password option (like tcpdf or haru for example).

    User passwords on PDF are hard to crack (Brute Force, Key Search and Dictionary Attack which might take a long time to complete). Use complex passwords and it becomes very hard.

    I don't have much experience with word documents, but I assume if there are certain libraries it would be the same as PDF.
     
    ThePHPMaster, Jan 8, 2016 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    The passwords on newer DOCX versions of Word documents can't really be cracked (there might be ways around it, but MS increased the security a lot after Office 2010 (or maybe it was 2007)).
    However, regardless, if you have the password, and can open the file, copying the content, or saving it as a new file without the password is easy, therefore the whole process is kind of useless.
     
    PoPSiCLe, Jan 8, 2016 IP