Skip to main content

hash

Syntax

Shorthand syntax

- hash: string

Extended syntax

- hash:
algorithm: string

Description

The hash operation performs applies a hash function to the input and forwards the result.

The hash function must be specified, with the following functions supported:

  • md5
  • sha1

Hashing a value can be useful for creating a relatively unique value, such as synthesizing an alarm considered from a source that only provides an alarm message or description. The max-length operation can be used to limit the length of the value.

Examples

  var1:
- source: alarm-msg
- hash: md5
- max-length: 8
info

In the above example, alarm-msg is an identifier from another part of the adapter script