Search

 

Module:Editor

Version:2.2.1 +

Type:String

Category:Text

 

Description

From Futurama 17.07 the formula 'Encrypt' is renamed to ‘HashText’.

The ‘HashText’ formula is one of the 4 cryptographic hash functions Futurama supports. In two steps the hash of a certain input is generated:

  1. first the hash is created from either a text or a binary file (for example a document created in Futurama, or a file that is read from a disk);
  2. in the second step this hash is converted to a string. This can be done by Base64 conversion or by Base64 conversion.

The next 4 hash functions are available:

  1. HashText: for hashing a string, and converting this hash using the Bitconverter;
  2. HashTextWithBase64: for hashing a string, and converting this hash using the Base64 converter;
  3. HashBase64EncodedFile: for hashing a binary file, and converting this hash using the Bitconverter;
  4. HashBase64EncodedFileWithBase64: for hashing a binary file, and converting this hash using the Base64 converter;

Futurama supports hashing using the next algorithms:

  • MD5
  • SHA1
  • SHA256

Parameters

Text

Here you can refer to or fill in the text to be hashed.

Method

Here you can fill in the hashing method that is used. Choose between MD5, SHA1 and SHA256. Other values result in the original text string.

Powershell code

Description

In order to give the specifications of the HashText function below the powershell code is given that exactly return the same hash as Futurama returns.

Powershell code

$enc = [system.Text.Encoding]::UTF8
$teststring = "textstring"
$content = $enc.GetBytes($teststring)
$hasher = [System.Security.Cryptography.SHA1]::Create()
$hash = [System.Convert]::ToBase64String($hasher.ComputeHash($content))
$hashbitconvert = [System.BitConverter]::ToString($hasher.ComputeHash($content))
$hashbitconvert = $hashbitconvert -replace "-",""
Write-Output ($teststring + ": " + $hash + "; " + $hashbitconvert)

In this code SHA1 is used, for MD5 and SHA256 this works the same. Output is both the HashText and the HashTextWithBase64 results. Note that UTF8-encoding is used.

Security

Since encryption is two-way, the data can be decrypted so it is readable again. Hashing, on the other hand, is one-way, meaning the plaintext is scrambled into a unique digest , through the use of a salt, that cannot be decrypted. Ensure you are using strong hashing algorithms.

Known issues:

  • For MD5 there exist well known ways to produce collisions on the hashes. If you choose to use MD5 make sure you are not using it for any sensitive information. MD5 is still very suitable to use for integrity hashes.

Updated: 2025-04-29