Skip to content

Transparently encrypted temporary files for Python

License

Notifications You must be signed in to change notification settings

f0rk/enctempfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

enctempfile

enctempfile allows you to transparently encrypt temporary files. These files are buffered in memory and broken down into blocks, and each individual block is written to a temporary file and encrypted using Fernet encryption, with temporary keys unique to each block.

Usage

import enctempfile

with enctempfile.TemporaryFile() as fp:

    fp.write(b"hello")
    fp.flush()

    fp.seek(0)

    print(fp.read())

All temporary files are currently mode wb+, text mode is not supported. Block size can be specified to the constructor using the block_size argument.

About

Transparently encrypted temporary files for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages