password-protection

How to password protect pdf in PHP [duplicate]

泄露秘密 提交于 2019-11-30 16:48:08
Possible Duplicate: How to password protect an uploaded pdf in PHP I have a web app where users can upload pdf documents. Is there a php library that I can use to password protect the pdf file? I need the library to preserve all aspects of the original pdf (i.e. size, fonts, resolution, etc). Favourite Onwuemene Download the library used: Protect PDF in PHP <?php function pdfEncrypt ($origFile, $password, $destFile){ //include the FPDI protection http://www.setasign.de/products/pdf-php-solutions/fpdi-protection-128/ require_once('fpdi/FPDI_Protection.php'); $pdf =& new FPDI_Protection(); //

How to password protect pdf in PHP [duplicate]

谁说我不能喝 提交于 2019-11-30 16:23:31
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: How to password protect an uploaded pdf in PHP I have a web app where users can upload pdf documents. Is there a php library that I can use to password protect the pdf file? I need the library to preserve all aspects of the original pdf (i.e. size, fonts, resolution, etc). 回答1: Download the library used: Protect PDF in PHP <?php function pdfEncrypt ($origFile, $password, $destFile){ //include the FPDI

Shell script password security of command-line parameters

让人想犯罪 __ 提交于 2019-11-30 15:26:56
问题 If I use a password as a command-line parameter it's public on the system using ps . But if I'm in a bash shell script and I do something like: ... { somecommand -p mypassword } ... is this still going to show up in the process list? Or is this safe? How about sub-processes: (...)? Unsafe right? coprocess? 回答1: Command lines will always be visible (if only through /proc). So the only real solution is: don't. You might supply it on stdin, or a dedicated fd: ./my_secured_process some parameters

Shell script password security of command-line parameters

僤鯓⒐⒋嵵緔 提交于 2019-11-30 14:17:41
If I use a password as a command-line parameter it's public on the system using ps . But if I'm in a bash shell script and I do something like: ... { somecommand -p mypassword } ... is this still going to show up in the process list? Or is this safe? How about sub-processes: (...)? Unsafe right? coprocess? Command lines will always be visible (if only through /proc). So the only real solution is: don't. You might supply it on stdin, or a dedicated fd: ./my_secured_process some parameters 3<<< "b@dP2ssword" with a script like (simplicity first) #!/bin/bash cat 0<&3 (this sample would just dump

Good Practice: How to handle keystore passwords in android/java? [duplicate]

帅比萌擦擦* 提交于 2019-11-30 13:33:41
This question already has an answer here: Handling passwords used for auth in source code 5 answers Assuming that a password for a keystore is not supplied by or bound to a user password (which more or less means its just a String or Array[] in the code somewhere), is it a sufficient protection that it just cannot or can only hardly be extracted out of the bytecode? I know that the password for a keystore (JKS / BKS) is just used to verify the integrity of the keystore. Furthermore it is totally clear that I have to assume that an application runs in a more or less trusted environment to be

How to store private encrypted user data in the database, but make them available to other chosen users?

一笑奈何 提交于 2019-11-30 11:41:29
问题 firstly, I apologize if my question sounds little confusing, I will try my best to describe my scenario as detailed as possible: I have website where user can input their personal data about themselves. They are mainly health data, so it's very private and sensitive information. So I need to encrypt this data on the server even then the server is compromised these data are secured because they will be encrypted with each user's password. Of course, user passwords will not be stored as clear

.htaccess in subdirectory 'overriding' parent htaccess

拜拜、爱过 提交于 2019-11-30 08:03:33
问题 been searching for 2 days and can't quite get the right solution due to my lack of understanding of mod_rewrite and time constraints on this project so hoping someone can help. The aim To rewrite all requests to the root index.php if the client doesn't have the correct cookie. If the client has the correct cookie allow them to browse as they wish. The problem The htaccess in my subdirectory is taking precendence over my root htaccess, so requests such as www.mydomain.com/subdir/index.php arn

How to disable the “save password” dialog on an Android WebView?

核能气质少年 提交于 2019-11-30 07:04:04
问题 I'd like to know how to prevent an Android WebView form asking to save the "password-data" from a html form? May you can help me out on this? 回答1: Try this: Get webview settings with .getSettings() and set this method setSavePassword(false) public void setSavePassword (boolean save) http://developer.android.com/reference/android/webkit/WebSettings.html#setSaveFormData(boolean) For those using API Level 18, please see Kirk Hammet's answer below. 回答2: @Nikola Despotoski answer was correct at

Secure ways to reset password or to give old password

≯℡__Kan透↙ 提交于 2019-11-30 04:10:36
问题 What is the most secure way to handle forgotten passwords/password resets? Should I email the password to the user? If so do you then force them to reset it? Or do you let them reset it immediately (without sending an email) and require some other information to verify that it is them? Or is there a better method? 回答1: You can't email the password to the user, because you don't know it. You've "hashed" it by applying something like PBKDF2 or bcrypt to it for storage, right? If you reset the

Opening and creating password protected zip files with PHP

家住魔仙堡 提交于 2019-11-30 03:48:49
问题 I have found the following two commands to respecively create and open password protected zip files. I was however wondering if it's possible to do this in pure PHP echo system('zip -P password file.zip file.txt'); echo shell_exec('unzip -P password file.zip'); 回答1: You can create simple file zip using some libraries (as PclZip) but you can't create zip with the password. 回答2: It was not possible do do below PHP5.6.0 . But in a new PHP5.6.x version developers added this functionality. So no