Search

 

Module: Editor

Version: 17.07 +

Type: String

Category:Text

 

Description

The ‘HashTextWithBase64’ 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 HashTextWithBase64 function below the powershell code is given that exactly return the same hash as Futurama returns.

Powershell code

Below the 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.

Updated: 2017-07-17