Cryptographic functions
Hash related functions.
hashCrc32
Returns a CRC32 hash for a given string expression.
Syntax
hashCrc32(expression)
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
expression | string | The string expression that will be hashed. | required |
Returns
The data type of the returned value is string
.
Examples
Example 1
data record(s = "DQL is awesome!")| fieldsAdd hashCrc32(s)
Query result:
s | hashCrc32(s) |
---|---|
|
|
hashMd5
Computes the MD5 hash for a given string expression.
Syntax
hashMd5(expression)
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
expression | string | The expression from which the MD5 hash needs to be computed. | required |
Returns
The data type of the returned value is string
.
Examples
Example 1
data record(s = "DQL is awesome!")| fieldsAdd hashMd5(s)
Query result:
s | hashMd5(s) |
---|---|
|
|
hashSha1
Computes the SHA-1 hash for a given string expression.
Syntax
hashSha1(expression)
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
expression | string | The expression from which the SHA-1 hash needs to be computed. | required |
Returns
The data type of the returned value is string
.
Examples
Example 1
data record(s = "DQL is awesome!")| fieldsAdd hashSha1(s)
Query result:
s | hashSha1(s) |
---|---|
|
|
hashSha256
Returns a SHA-256 hash for the given expression.
Syntax
hashSha256(expression)
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
expression | string | The string expression that will be hashed. | required |
Returns
The data type of the returned value is string
.
Examples
Example 1
data record(s = "DQL is awesome!")| fieldsAdd hashSha256(s)
Query result:
s | hashSha256(s) |
---|---|
|
|
hashSha512
Returns a SHA-512 hash for the given expression.
Syntax
hashSha512(expression)
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
expression | string | The string expression that will be hashed. | required |
Returns
The data type of the returned value is string
.
Examples
Example 1
data record(s = "DQL is awesome!")| fieldsAdd hashSha512(s)
Query result:
s | hashSha512(s) |
---|---|
|
|
hashXxHash32
Returns a xxHash32 hash for a given string expression.
Syntax
hashXxHash32(expression)
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
expression | string | The expression that is considered for the hash function. | required |
Returns
The data type of the returned value is string
.
Examples
Example 1
data record(s = "DQL is awesome!")| fieldsAdd hashXxHash32(s)
Query result:
s | hashXxHash32(s) |
---|---|
|
|
hashXxHash64
Returns a xxHash64 hash for a given string expression.
Syntax
hashXxHash64(expression)
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
expression | string | The expression that is considered for the hash function. | required |
Returns
The data type of the returned value is string
.
Examples
Example 1
data record(s = "DQL is awesome!")| fieldsAdd hashXxHash64(s)
Query result:
s | hashXxHash64(s) |
---|---|
|
|