๐Ÿ”’ Hash function

Take advantage of the hash function used by Helios to obfuscate data when troubleshooting or testing sensitive information.

Sensitive data is obfuscated in the Helios SDK using an irreversible hash function.
The hash function used to obfuscate data can be imported from the SDK, and applied with the user's private key on any value to discover its hash. This is useful in tests and scripts, where the hash itself is needed, or even to search for obfuscated data in Helios' application.

In the following example John Smith is the value to obfuscate and 12345 is the private key:

import { obfuscateData } from 'helios-opentelemetry-sdk';

const obfuscatedData = obfuscateData('John Smith', '12345');
console.log(obfuscatedData); // 2d3ab0b76c1e43701705e92f7c7bdc06817fd9ff86cca9ef5860786decf7a24c
from helios import obfuscate_data

obfuscated_data = obfuscate_data('12345', 'John Smith')
print(obfuscated_data) # 2d3ab0b76c1e43701705e92f7c7bdc06817fd9ff86cca9ef5860786decf7a24c