question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configuring specific token hashing algorithm

See original GitHub issue

Would be nice to have a way to force a particular hashing algorithm with Dask via set_options. Stealing the code snippet below from @jcrist’s comment. This is needed for use cases where having reproducible hashes are necessary (e.g. caching, versioning, etc.).

dask.set_options(tokenize_hash='mmh3')  # use mmh3, error if not available
dask.set_options(tokenize_hash=None)   # Use best available hash, default behavior

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jcristcommented, Jan 18, 2018

You’d make the hash_buffer function check some global option first, and fallback to the default if unset. This is a common pattern in dask, see e.g. https://github.com/dask/dask/blob/master/dask/base.py#L218. Note that currently the fast hashers are only used for things like numpy arrays, and not for all tokenize operations, so the option name might be dask.set_options(hash_buffer='mmh3') or something similar.

0reactions
jakirkhamcommented, Oct 29, 2018

It remains interesting. Would describe it as medium to long range priority for me though.

Guess the strategy for solving this requires revisiting as this preceded the config revamp.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configurable token hash algorithm · bf4ff96472 - keystone
There's a new configuration option 'hash_algorithm' in the [token] section. This is the algorithm to use for hashing PKI tokens, so is used...
Read more >
Setting Up OAuth Token Hashing
WSO2 Identity Server (WSO2 IS) allows you to enable OAuth2 token hashing to protect OAuth2 access tokens, refresh tokens, consumer secrets, and authorization ......
Read more >
Hashing tokens for extra security | Apigee Edge
If you have existing hashed tokens and want to retain them until they expire, set the following properties in your organization, where the...
Read more >
Change signature hash algorithm for Microsoft 365 relying ...
Active Directory Federation Services (AD FS) signs its tokens to Microsoft Azure Active Directory to ensure that they cannot be tampered with.
Read more >
Configuring for encryption or hashing - IBM
The one-way hashing algorithms supported by the LDAP server are crypt, MD5, SHA, Salted SHA (SSHA), SHA-2 and Salted SHA-2. The SHA-2 and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found