libkeepass / pykeepass

Python library to interact with keepass databases (supports KDBX3 and KDBX4)
https://pypi.org/project/pykeepass/
GNU General Public License v3.0
411 stars 96 forks source link

Allow keyfile to be passed as bytes #364

Closed janbrummer closed 10 months ago

janbrummer commented 11 months ago

In order to prevent application to create temporary files, provide keyfile as bytes.

Fixes: https://github.com/libkeepass/pykeepass/issues/363

janbrummer commented 11 months ago

@Evidlo May i ask you for a review?

A6GibKm commented 10 months ago

Hello sorry to ping you @Evidlo. Is anything missing on your end?

Evidlo commented 10 months ago

Sorry for the late response.

I did a refactor which is a bit simpler than before, but it assumes that keyfile is a file-like object (such as BytesIO). Also I cleaned up tests a bit so BytesIO can be passed into the keyfiles list.