- #1

- 4

- 0

## Main Question or Discussion Point

Hi all

Basically, I'm looking for a fingerprinting or perfect hash function.

The key is 40 alpha characters, specifically

The index is a 12-digit integer.

Firstly, is it even possible to map this many keys to a maximum of 1x10^12 indexes?

If it is, I would appreciate any help on working out the algorithm. The end product has to be in Natural, but I should be able to translate from any C-style language.

Thanks so much!

Ross

Basically, I'm looking for a fingerprinting or perfect hash function.

The key is 40 alpha characters, specifically

__\b[A-Z_]{40}\b__.The index is a 12-digit integer.

- The function must be deterministic, i.e. if a key maps to an index, it must always map to the same index.
- The function must not be surjective, i.e. only one key must map to each index, but there may be some indexes which do not have corresponding keys.
- The function does not need to be cryptographic.

Firstly, is it even possible to map this many keys to a maximum of 1x10^12 indexes?

If it is, I would appreciate any help on working out the algorithm. The end product has to be in Natural, but I should be able to translate from any C-style language.

Thanks so much!

Ross