hash

Hashes messages according to the selected algorithm.

hash:
algorithm: sha256

This processor is mostly useful when combined with the process_field processor as it allows you to hash a specific field of a document like this:

# Hash the contents of 'foo.bar'
process_field:
path: foo.bar
processors:
- hash:
algorithm: sha256

Fields

algorithm

string The hash algorithm to use.

Options are: sha256, sha512, sha1, xxhash64.

parts

array An optional array of message indexes of a batch that the processor should apply to. If left empty all messages are processed. This field is only applicable when batching messages at the input level.

Indexes can be negative, and if so the part will be selected from the end counting backwards starting from -1.