derrix060 / onedriveClient

A Microsoft OneDrive and OneDrive for Business client for Linux, written in Python3.
MIT License
65 stars 10 forks source link

Change implementation of OneDriveAPISession #40

Open derrix060 opened 5 years ago

derrix060 commented 5 years ago

OneDriveAPISession is using keyring at the moment and this requires some specifics from the environment that it is running on. Changing to a nice encryption method (like keyring).

one good start: https://cryptography.io/en/latest/fernet/#using-passwords-with-fernet.

The salt could be generated once and stored in the default config file, so it can be changed by the user if necessary.

The password could be some env variable, saved into a file or even as an argument. Remembering that this password/salt is specific per user.

derrix060 commented 5 years ago

I've tested encrypting and decrypting the same content that is saved into keyring at the moment generated by pickle (a byte-like representation of the session object) and works fine.