Skip to main content

[![Build Status](https://travis-ci.com/VidaID/pysecbytes.svg?branch=master)](https://travis-ci.com/VidaID/pysecbytes)

## Install:

pip install SecureBytes

## Use:

Currently supports clearing integers, strings and bytes

from SecureBytes import clearmem, safemem

x = b’data that must be removed’

copy_of_x = x

clearmem(x)

assert(b’data’ not in copy_of_x)

In python3 only, temporarily overriding mem allocator to zero ram and prevent paging:

with safemem():

x = b’data that must be removed’ del x

# x is not in ram

Currently, safemem and scanmem aren’t supported on all pythons and platforms, use import safemem_supported, scanmem_supported to check.

## Warnings:

  • Do not try to derive from str or bytes… extra copies of your data will be made

  • Clearing strings and bytes also clears all references to them

  • If you choose store sensitive material in a class, and put clearmem in __del__, it will only be cleared when the last reference is freed

  • “safemem” is not yet efficient (TODO), and it only prevents swapping on Windows (TODO)

Metadata

Release files for SecureBytes 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SecureBytes 0.3.5
File Size Uploaded
SecureBytes-0.3.5.tar.gz 6.0 kB Details

Release files / SecureBytes-0.3.5.tar.gz

Download URL SecureBytes-0.3.5.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
24241525ce3bd3cf259fdc41c55786f13aa8fb20cfce25455d2618851d6d3852
BLAKE2b-256 checksum
How to use checksums
66da0c50a4d4decd15bc5e0816670128601c1ae78f6de945f0ffb36e74eadd00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.3.5 This release

1 release file

0.3.4

2 release files

0.3.3

2 release files

0.3.2

1 release file

0.3.1

1 release file

0.2.7

2 release files

0.2.6

1 release file

0.2.5

1 release file

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page