Splunk® Data Stream Processor

Function Reference

On April 3, 2023, Splunk Data Stream Processor reached its end of sale, and will reach its end of life on February 28, 2025. If you are an existing DSP customer, please reach out to your account team for more information.

All DSP releases prior to DSP 1.4.0 use Gravity, a Kubernetes orchestrator, which has been announced end-of-life. We have replaced Gravity with an alternative component in DSP 1.4.0. Therefore, we will no longer provide support for versions of DSP prior to DSP 1.4.0 after July 1, 2023. We advise all of our customers to upgrade to DSP 1.4.0 in order to continue to receive full product support from Splunk.

Cryptographic

Cryptographic functions return hashes in bytes, so you need to convert your bytes to a Base64-encoded string to send your data to a destination. See the base64_encode scalar function.

md5(input)

This function computes and returns the MD5 hash of a byte value X. Because this function takes bytes as its input, first use the to_bytes conversion function to convert your string into a byte string.

Function Input
input: bytes
Function Output
bytes

SPL2 examples

When working in the SPL View, you can write the function by using the following syntax.

...| eval hashed_bytes_md5=md5(to_bytes("hash-me"));

Alternatively, you can use named arguments.

...| eval hashed_bytes_md5=md5(input: to_bytes("hash-me"));

sha1(input)

This function computes returns the secure hash of a byte value X based on the FIPS compliant SHA-1 hash function. Because this function takes bytes as its input, first use the to_bytes conversion function to convert your string into a byte string.

Function Input
input: bytes
Function Output
bytes

SPL2 examples

When working in the SPL View, you can write the function by using the following syntax.

...| eval hashed_bytes_sha1=sha1(to_bytes("hash-me"));

Alternatively, you can use named arguments.

...| eval hashed_bytes_sha1=sha1(input: to_bytes("hash-me"));

sha256(input)

This function computes and returns the secure hash of a byte value X based on the FIPS compliant SHA-256 hash function. Because this function takes bytes as its input, first use the to_bytes conversion function to convert your string into a byte string.

Function Input
input: bytes
Function Output
bytes

SPL2 examples

When working in the SPL View, you can write the function by using the following syntax.

...| eval hashed_bytes_sha256=sha256(to_bytes("hash-me"));

Alternatively, you can use named arguments.

...| eval hashed_bytes_sha256=sha256(input: to_bytes("hash-me"));

sha512(input)

This function computes and returns the secure hash of a byte value X based on the FIPS compliant SHA-512 hash function. Because this function takes bytes as its input, first use the to_bytes conversion function to convert your string into a byte string.

Function Input
input: bytes
Function Output
bytes

SPL2 examples

When working in the SPL View, you can write the function by using the following syntax.

...| eval hashed_bytes_sha512=sha512(to_bytes("hash-me"));

Alternatively, you can use named arguments.

...| eval hashed_bytes_sha512=sha512(input: to_bytes("hash-me"));
Last modified on 21 April, 2021
Conversion   Date and Time

This documentation applies to the following versions of Splunk® Data Stream Processor: 1.2.0, 1.2.1-patch02, 1.2.1, 1.2.2-patch02, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters