Configuring specific token hashing algorithm
See original GitHub issueWould 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:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 likenumpy
arrays, and not for alltokenize
operations, so the option name might bedask.set_options(hash_buffer='mmh3')
or something similar.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.