Detail: Index: Accessor Hashlib

Overview: Index: Accessor Hashlib

Index.via_hashlib(include_name, include_class, encoding).to_bytes()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.to_bytes()[source]

Return the byte signature for this container, suitable for passing to a cryptographic hash function.

>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).to_bytes()
b'Indexq\x00\x00\x00r\x00\x00\x00s\x00\x00\x00 \x00\x00\x00X\x00\x00\x00Y\x00\x00\x00Z\x00\x00\x00\x00\x00\x00\x001\x00\x00\x002\x00\x00\x003\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00w\x00\x00\x00X\x00\x00\x00 \x00\x00\x00'
Index.via_hashlib(include_name, include_class, encoding).md5()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.md5()[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).md5().hexdigest()
24ed80ccfb988104bf351eceade4b5ec
Index.via_hashlib(include_name, include_class, encoding).sha256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha256()[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).sha256().hexdigest()
0ae1ec6f45473d8355874141cb3808c3bc440044c98002abd3dd9ca04042088a
Index.via_hashlib(include_name, include_class, encoding).sha512()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha512()[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).sha512().hexdigest()
8ffed6cb9adc71dd15b29e078c83e0e6eabc0e607a5d47f54edefa7a2e76553b00f71e5c0058eba4ac0e3bad9047a7d9807e00f30e7125107f411d07c43245db
Index.via_hashlib(include_name, include_class, encoding).sha3_256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha3_256()[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).sha3_256().hexdigest()
3e02e7b632ffc3ebf6ac0f5dbe738eb0eba03d06190f8c07d4002cf58d6886da
Index.via_hashlib(include_name, include_class, encoding).sha3_512()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha3_512()[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).sha3_512().hexdigest()
8fa349fcfad0cc3fa459167b74e1c0c2d36df9680a31adc4fdd0e10d8b489dda493ebffb7963f9eec7ab68d2ac75e62be575d4a98acd8136f4a28268dd130a72
Index.via_hashlib(include_name, include_class, encoding).shake_128()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.shake_128()[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).shake_128().hexdigest(8)
eee1376b5761f54b
Index.via_hashlib(include_name, include_class, encoding).shake_256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.shake_256()[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).shake_256().hexdigest(8)
9d0fbdaf57c8d41f
Index.via_hashlib(include_name, include_class, encoding).blake2b(*, digest_size, key, salt, person, fanout, depth, leaf_size, node_offset, node_depth, inner_size, last_node)
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.blake2b(*, digest_size=64, key=b'', salt=b'', person=b'', fanout=1, depth=1, leaf_size=0, node_offset=0, node_depth=0, inner_size=0, last_node=False)[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).blake2b().hexdigest()
a93c96cab59f877491edb9fa52696e120bfd39a4ba10f97cf7a30688044dc14c169d299c33acb7ea6eaf350bea531a2868cd3cf29ae160a508dc13d6dcdf10fe
Index.via_hashlib(include_name, include_class, encoding).blake2s(*, digest_size, key, salt, person, fanout, depth, leaf_size, node_offset, node_depth, inner_size, last_node)
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.blake2s(*, digest_size=32, key=b'', salt=b'', person=b'', fanout=1, depth=1, leaf_size=0, node_offset=0, node_depth=0, inner_size=0, last_node=False)[source]
>>> ix = sf.Index(('qrs ', 'XYZ', '123', ' wX '))
>>> ix
<Index>
qrs
XYZ
123
 wX
<<U4>
>>> ix.via_hashlib(include_name=False).blake2s().hexdigest()
c5b2ec8be5df645b7f8b60d167be31e72fa7197612bd5887765cea5203ce0c79

Index: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic