Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I make a batch file when I create a password so it will save it in the file accounts.uf. I want to be able to change the extension to txt and have the password appear in accounts.txt, but I want to encrypt it.

Here is an example:

When I set my password to 1, it should write in password file 6k5j4kjfdkj (encrypted). When I login to in my program it needs the password to continue, but I need to write the cleartext password not the encrypted password.

(Please write the encrypted password code alone and use the normal password in login code alone.)

share|improve this question
1  
Why not store your passwords in something like Keypass –  50-3 Sep 6 '13 at 0:22
    
I agree with @50-3 Neither batch nor text files were meant for encrypting passwords –  AthomSfere Sep 6 '13 at 0:46
    
@AthomSfere Yer I've submitted it as as answer with a full explanation, I think it's just a case of user inexperience so hopefully OP will learn from this :) –  50-3 Sep 6 '13 at 1:08

1 Answer 1

Not full answer

Suggesting alternative method not solution


Batch files and text files are not an ideal solution for storing password.

You can encrypt the drive that these files reside on to make them "Secure" but I wouldn't call that ideal

Your best solution would be to use a 3rd party software package to store you passwords in an encrypted DB

Example Keypass

KeePass is a free open source password manager, which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key file. So you only have to remember one single master password or select the key file to unlock the whole database. The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish).

Keypass

I personally use this for work as I have ~200 diffrent passwords to remember


There are plenty of solutions like this so do some research but what your looking at doing is far far far away from an ideal solution

share|improve this answer
    
i think you not understand >> i have program to lock and unlock folders but it don`t have password then i made a batch file to start it if you know the password and the password is not encrypt (any budy can change the extension to text and know the password) put i want to encrypt the password can any one give encrypt code ? –  موفق ولي Sep 6 '13 at 2:25
    
can any one help my ?? –  موفق ولي Sep 7 '13 at 20:37
2  
You've asked a question that is very bad practice in application and You're unlikely to get a better response then what has been given. Your best bet if it needs to be a batch is to find a solution similar to Keypass that can pass stored information through command line arguments –  50-3 Sep 8 '13 at 7:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.