Computes a cryptographic MD5-hashing of an input string of one field or an array of fields. The hashed output is returned as a hex string, meaning the hexadecimal representation of the MD5 hash of data.

This function can be used to calculate checksums to compare outside of LogScale or collect multiple fields into a combined string of fixed length.

ParameterTypeRequiredDefault ValueDescription
asstringoptional[a] _md5 The name of the output field.
field[b]array of stringsrequired   The name of the field or fields to hash.

[a] Optional parameters use their default value unless explicitly set.

[b] The parameter name field can be omitted.

Hide omitted argument names for this function

Show omitted argument names for this function

crypto:md5() hashes the UTF-8 encoding of the fields.

When providing more than one field:

  • the function hashes the concatenation of the fields

  • if a given field is missing from an event — or if it has an empty value — it is treated as the empty string.

crypto:md5() Examples

Click + next to an example below to get the full details.

MD5 Hash Multiple Fields

MD5 hash multiple fields using the crypto:md5() function

MD5 Hash a Field With a Given Value

MD5 hash a field with a given value using the crypto:md5() function