Calculates a secure hash of a field for storing in the event. See
hashMatch()
on how to search for events using hashes.
Bits can reduce the width of the output if desired to keep the resulting
strings short.
Parameter | Type | Required | Default Value | Description | |
---|---|---|---|---|---|
as | string | optional[a] | The name of output field, defaults to the input field. | ||
bits | integer | optional[a] | 256 | Hash algorithm output bits to keep. Must be a multiple of 8. | |
Minimum | 8 | ||||
Maximum | 512 | ||||
field [b] | string | required | The name of the field to hash. | ||
hash | string | optional[a] | sha256 | Hash algorithm. | |
Valid Values | |||||
sha256 | |||||
sha512 | |||||
replaceInRawstring | boolean | optional[a] | true | Replace all substrings in @rawstring that has the input value with the hash too. | |
salt | string | required | The name of the secret salt to use. | ||
[a] Optional parameters use their default value unless explicitly set. |
Hide omitted argument names for this function
Omitted Argument NamesThe argument name for
field
can be omitted; the following forms of this function are equivalent:logscalehashRewrite("field",salt="value")
and:
logscalehashRewrite(field="field",salt="value")
These examples show basic structure only.
hashRewrite()
Examples
Replace the value in the ssn field with the hash of the existing value, also replacing it in @rawstring
logscale
hashRewrite(ssn, salt="salt1")