Is there a scramble function?

James Sidebotham
edited December 2023 in General


Is there a scramble function (much like there was in Pandora), as that feature was great for hiding PII but keeping the cardinality of values.


Best Answer

  • Henry Simms
    Henry Simms Administrator
    edited June 2023 Answer ✓

    Having a look at what Pandora's scramble did, and specifically it retains the format of values (length, character type), as well as transforming values consistently:

    It does this by replacing alphabetic characters with other random alphabetic chars, numbers with other numbers, and retaining most common non-alphanum characters.

    Given this, the hash code function alone may not be quite the right thing, depending on the use-case, because it transforms values consistently but at the expense of format:

    If you want to retain the format, also using the Format pattern function may be useful:

    The format pattern is derived by replacing character types with a standard character (eg all alphabetic characters become A, all numeric chars become 9).