Skip to main content

Tools to prove ownership of content

Project description

owner

Tools to prove ownerhip of content

To install: pip install owner

Examples

from owner import weave, unweave

assert (weave(b'bob and alice') == 
        (b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
         b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
         b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00`\x0c14\xf2\x834\xa3\xc0\x0c\xe3\xa8i9\r'
         b'\xe2\xd3\x01\xb1Fj\x11U\x92j^Z\xa8\xaa\x9e\x89\xa2\xd5bob and alice')
       )

unweave(weave(b'bob and alice')) == b'bob and alice'

Some utils...

from owner import bytes_to_hash, bytes_to_int, 

assert (bytes_to_hash(b'bob and alice') 
        == b'\x0c14\xf2\x834\xa3\xc0\x0c\xe3\xa8i9\r\xe2\xd3\x01\xb1Fj\x11U\x92j^Z\xa8\xaa\x9e\x89\xa2\xd5')

assert bytes_to_int(int_to_bytes(123456)) == 123456

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

owner-0.0.5.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

owner-0.0.5-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page