password-protection

Blocking android apps programmatically

若如初见. 提交于 2019-11-28 02:44:10
I tried to develop such an app, in the sense I want to lock all the applications in my device with a password whatever I want. But I didn't find any piece of code for the solution. So I developed one by myself and unfortunately it didn't succeed. I found many solutions for locking android devices but, didn't find one for locking an app. Will be glad if you suggest a solution. Amit Gupta I used a background service to check which application is in the foreground (which means that application is being used by the user). Then I check to see whether I need to lock the application or not. To find

VBA Project Password-Protect with SendKeys not Working Correctly

限于喜欢 提交于 2019-11-28 02:04:22
问题 I've spent the last two days working on this problem. Most of the content I've found on this topic doesn't address the issue I'm having, so I'm hopeful that someone here can help me. I've been working on some code that does the following from a "master scorecard" workbook: Takes each "student" sheet in the workbook and copies the sheet into a new workbook, Does a few minor manipulations of the new workbook, Imports a module of code into the new workbook, Adds a Workbook_Open event and a

What way is the best way to hash a password? [duplicate]

社会主义新天地 提交于 2019-11-28 01:15:24
问题 This question already has an answer here: Secure hash and salt for PHP passwords 14 answers I'm working on a website that should be very safe for the users, so I need the hash the passwords. Usually I'm using the MD5, but I read that it doesn't safe anymore. So I tried PHPass, but then I read that it also has been cracked. So I tried password_hash() of PHP 5.5, but I use HostGator, and the PHP there is 5.4. Also I want to be able to add salt without knowing it (like time() * userid() ), like

How long should my password salt be, and is SHA-256 good enough?

…衆ロ難τιáo~ 提交于 2019-11-28 00:53:07
I'm in the process of creating a gaming community site that I'm aiming to release to the public soon. Currently, I'm working on passwords and logins. I've only used MD5 before, but I've read about password safety and heard that salting is currently the way to go. Here's my plan: Every user has their own unique salt of 12 random characters (#/¤& etc), stored in the users table. The salt is hashed (using SHA-256) along with the password on registration, and re-hashed on login. How does this sound to you? Anything I can improve? Should I go for SHA-512 and a longer salt, or is this enough? Your

Password Protecting an Excel file in C#

浪子不回头ぞ 提交于 2019-11-28 00:12:29
Does anyone know the syntax for this? I've been looking everywhere and all I can find is C++ code for this. I'm trying to password protect an excel file programatically using the System.IO.Packaging namespace. Any ideas? Additional notes: I'm NOT using the Excel interop--but instead the System.IO.Packaging namespace to encrypt and password protect the excel file. If you want an Excel password all you need is something like this: using Microsoft.Office.Interop.Excel //create your spreadsheet here... WorkbookObject.Password = password; WorkbookObject.SaveAs("spreadsheet.xls") This requires Excel

Password protecting my android app (the simple way)

荒凉一梦 提交于 2019-11-27 21:21:11
问题 I've built my first app, and I would like to password protect it. It's fine for me to store the password in the Java files and the method needs to be as simple as possible because i have no experience of java or even xml before this app. I've had a few attempts and failed so I was hoping someone can help me out. I've created the layout with an EditText field: <EditText android:id="@+id/passwordedittext" android:layout_width="200dp" android:layout_height="50dp" android:inputType="textPassword"

Python's safest method to store and retrieve passwords from a database

烈酒焚心 提交于 2019-11-27 17:27:30
Looking to store usernames and passwords in a database, and am wondering what the safest way to do so is. I know I have to use a salt somewhere, but am not sure how to generate it securely or how to apply it to encrypt the password. Some sample Python code would be greatly appreciated. Thanks. rz. Store the password+salt as a hash and the salt. Take a look at how Django does it: basic docs and source . In the db they store <type of hash>$<salt>$<hash> in a single char field. You can also store the three parts in separate fields. The function to set the password: def set_password(self, raw

Removing the password from a VBA project

浪子不回头ぞ 提交于 2019-11-27 16:42:26
How can I programmatically remove a (known) password from an Excel VBA project? To be clear: I want to remove the password from the VBA Project, not the workbook or any worksheets. This has a simple method using SendKeys to unprotect the VBA project. This would get you into the project, so you'd have to continue on using SendKeys to figure out a way to remove the password protection: http://www.pcreview.co.uk/forums/thread-989191.php And here's one that uses a more advanced, somewhat more reliable method for unprotecting. Again, it will only unlock the VB project for you. http://www.ozgrid.com

How to start a dialog (like alarm dimiss /snooze) that can be clicked without unlocking the screen

人走茶凉 提交于 2019-11-27 16:23:59
问题 I dont want to permanently bypass keyguard, just for that moment .For example when a alarm is raised (eg wake up alarm) i can dismiss /snooze it whithout unlocking screen .I want to achive the same behaviour.I want start a dialog which should be on top on locked screen. I can click button on dialog without unlocking .Is this possible ?If yes how? I dont want the following : private void unlockScreen(Context context){ Log.d("dialog", "unlocking screen now"); PowerManager powermanager = (

How to create a password protected pdf file

北战南征 提交于 2019-11-27 15:23:57
问题 I'm using html2fpdf for creating PDF documents. Now once I have created that, I want to make sure that the PDF file is password protected. How can this be done in PHP? 回答1: Download the library I am using from a blog post on the ID Security Suite site: <?php function pdfEncrypt ($origFile, $password, $destFile){ require_once('FPDI_Protection.php'); $pdf =& new FPDI_Protection(); $pdf->FPDF('P', 'in'); //Calculate the number of pages from the original document. $pagecount = $pdf->setSourceFile