0

For fun I am writing code that will hash a password with salt, just to try out (not for actual usage).

The problem is, I do not know how to store these passwords - If it was on the users hard drive, wouldn't it be insecure and only accessible by the person using it?

Can I store this file of hashed passwords + salt on Google drive, or some other online database? If so, how can this be accessed using python? I know you can do:

File = open('passwords.txt')

But how would this work with an online database?

Thanks for any responses :)

3
  • if your online database provides API for CRUD operations with files than it can work Commented May 2, 2017 at 6:19
  • Got an example of a database or code that I can go about to make this? I have never done this before and am completely clueless on how to do it. Commented May 2, 2017 at 6:24
  • Remember why they are hashed and salted in the first place? In case the file does become compromised (you assume this will happen eventually), It's still a bunch of work to try to crack the hashes. The salt means that it's a lot more work to precompute and match the hashes. eg. "password1" at least isn't always the same exact hash. Making the file publicly accessible still isn't recommended (especially if users create their own passwords) Commented May 2, 2017 at 7:01

1 Answer 1

1

You're right, you would need to host the file somewhere online so that it can be accessed from anywhere.

Since you're doing this for fun, you could easily store the file in, say, Dropbox, or in Google Drive as you suggested. You could then get a sharing link for the file. Using the urllib or requests module, any user could then read this file.

This is definitely not advisable if you're trying to actually implement this, but would work fine if you're just messing around.

(A slightly more 'serious' way, but still simple, would be to host a small app on something like Heroku to hold the database.

Sign up to request clarification or add additional context in comments.

2 Comments

Hope this isn't too big a question, I have created this document in Google drive: docs.google.com/document/d/… how would I go about printing each line (for testing)
Please have a look at stackoverflow.com/questions/1393324/…, and also stackoverflow.com/questions/32971752/…. These should show you exactly how to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.