Version: 2.2.1 +
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:
- 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);
- 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:
- HashText: for hashing a string, and converting this hash using the Bitconverter;
- HashTextWithBase64: for hashing a string, and converting this hash using the Base64 converter;
- HashBase64EncodedFile: for hashing a binary file, and converting this hash using the Bitconverter;
- HashBase64EncodedFileWithBase64: for hashing a binary file, and converting this hash using the Base64 converter;
Futurama supports hashing using the next algorithms:
Here you can refer to or fill in the text to be hashed.
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.
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.
$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.