Detail: Quilt: Accessor Hashlib#

Overview: Quilt: Accessor Hashlib

Quilt.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.

>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).to_bytes()
b'QuiltIndexHierarchy0\x00\x00\x000\x00\x00\x002\x00\x00\x002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00Indexa\x00\x00\x00b\x00\x00\x00c\x00\x00\x00BusIndex0\x00\x00\x002\x00\x00\x00FrameIndex\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00Indexa\x00\x00\x00b\x00\x00\x00c\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x01\xb1y\xfd\xff\xff\xff\xff\xff\x0bz\xfd\xff\xff\xff\xff\xffFrameIndex\x02\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00Indexa\x00\x00\x00b\x00\x00\x00c\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x01\x00\x1d{\xfd\xff\xff\xff\xff\xffez\xfd\xff\xff\xff\xff\xff'
Quilt.via_hashlib(*, include_name, include_class, encoding).md5()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.md5()[source]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).md5().hexdigest()
c0ca678d708cce27405db82d2bee4950
Quilt.via_hashlib(*, include_name, include_class, encoding).sha256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha256()[source]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).sha256().hexdigest()
9703241466374f7e66f5ec3ceb4857e097dfd8343d0f15d2b8ce80beb0f78711
Quilt.via_hashlib(*, include_name, include_class, encoding).sha512()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha512()[source]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).sha512().hexdigest()
c31d8f54e37e88848421c510e265d237c444d5b88df37dd947ae7bdbac50cbdb8165ebd8134a0773fdd29cdb4dceb7dc133de3edb7097023f95d4bd09686060a
Quilt.via_hashlib(*, include_name, include_class, encoding).sha3_256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha3_256()[source]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).sha3_256().hexdigest()
5be80b11568f6b745463b8e1a9a97c5456e8f0f15108987fbc4718ef442185f0
Quilt.via_hashlib(*, include_name, include_class, encoding).sha3_512()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha3_512()[source]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).sha3_512().hexdigest()
5260c8e4f33724812637a8d4007991ccc17f50b61be3312eed0b12524660161c01b0fcdf82c0ea405b6ce246f366f1705e99fe24afd3e9a38449631a0e29a264
Quilt.via_hashlib(*, include_name, include_class, encoding).shake_128()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.shake_128()[source]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).shake_128().hexdigest(8)
61452ae38bc2c36b
Quilt.via_hashlib(*, include_name, include_class, encoding).shake_256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.shake_256()[source]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).shake_256().hexdigest(8)
84078ff61bbf0590
Quilt.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]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).blake2b().hexdigest()
5d9831aefda53cb48c101b7fe4a3cb2370813748d9641c614048e6e82d99393dc8a762653dc7c7a947ea19d65753e8b097b7f1cd15db3daca0a1494b93342861
Quilt.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]
>>> q = sf.Quilt.from_frame(sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'), retain_labels=True, chunksize=2, label_extractor=lambda x: str(x.iloc[0]))
>>> q
<Quilt: x>
<Index: Aligned> a b c <<U1>
<Index: Frames>
0                . . .
2                . . .
<<U1>
>>> q.via_hashlib(include_name=False).blake2s().hexdigest()
28bb86ca63168ca5b2d99b2f0a2acc9f6a403b9ecffc10bc386da6d38fc7814a

Quilt: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Accessor Hashlib | Accessor Type Clinic