Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the default value TYK_GW_HASHKEYFUNCTION #5559

Closed
jakub-bochenski opened this issue Sep 14, 2023 · 3 comments
Closed

What is the default value TYK_GW_HASHKEYFUNCTION #5559

jakub-bochenski opened this issue Sep 14, 2023 · 3 comments

Comments

@jakub-bochenski
Copy link

hash_key_function

EV: TYK_GW_HASHKEYFUNCTION
Type: string

Specify the Key hashing algorithm. Possible values: murmur64, murmur128, sha256.

The documentation doesn't tell what the default value will be if it's not specified (unlike e.g. basic_auth_hash_key_function)

@jakub-bochenski
Copy link
Author

You promised to document default values back in May TykTechnologies/tyk-docs#2530

@jakub-bochenski
Copy link
Author

Seems to be murmur32 based on those release notes https://github.com/TykTechnologies/tyk-docs/blob/af39a6183263dfe593d31450fafc3aebb4e7236c/tyk-docs/content/release-notes/version-2.7.md?plain=1#L38

Interesting that murmur32 is not even documented as a valid option

@andyo-tyk
Copy link
Contributor

Hi @jakub-bochenski,

Tyk implements MurmurHash 3 and offers three different output sizes to allow tuning of the hash size and collision probability.

You can select the option you require using the TYK_GW_HASHKEYFUNCTION variable:
murmur32 - 32-bit output
murmur64 - 64-bit output
murmur128 - 128-bit output

You can alternatively choose the crytographic sha256 hashing algorithm.

The default value used by Tyk, if hashing is enabled but no algorithm selected via TYK_GW_HASHKEYFUNCTION is murmur64.

I'm sorry for the delay getting back to you on this.

Thank you for supporting Tyk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants