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.7.tar.gz
(4.0 kB
view hashes)
Built Distribution
owner-0.0.7-py3-none-any.whl
(5.4 kB
view hashes)