-1

I am creating a cli application in python using Click and wants to store data as follows:

  • username and passwords preferrably in json
  • some data related to that user in json file format

but I don't want users of that cli application to have access to those files. Users will use that cli locally and thus will have access to files of that system

How can I achieve that?

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
  • 1
    I guess that's impossible, user has access to app source code, to files. Meaning user can do anything with it no matter what you do. Storing something on user machine basically means that those files belongs to user, dunno why you want hide them – m9_psy Jul 04 '19 at 21:34
  • https://stackoverflow.com/questions/2490334/simple-way-to-encode-a-string-according-to-a-password/55147077#55147077 – Stephen Rauch Jul 04 '19 at 23:00

1 Answers1

0

If you don't want people to see it, don't store it. You can store salted hashes, if you don't need to hide it that much.

For the data you can try some form of criptography, but you'd need to make sure that the user never finds out the password.