fasthash

Description

Returns a numeric hash for the specified string.
fasthash is guaranteed to return a high quality hash of the input as quickly as practical. The hash value returned is between 0 and 2^63-1 inclusive (a positive integer).
fasthash was added because there are many use cases (ie CARP) which need a hash of some value (ie URI) and which were using crc32 (which is a bad and slow hash function).
Note: fasthash does not guarantee to provide the same hash value across different BIG-IP versions and over BIG-IP reboots. Do not use fasthash for long term and persistent storage.

Syntax

fasthash <string>

Examples

when CLIENT_ACCEPTED {
    set str "hello world"
    log local0. "hash of $str is [fasthash $str]"
}

Introduced: BIGIP-11.4.0

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.