Search

 

Module: Editor

Version: 17.07 +

Type: String

Category:Text

 

Description

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

Powershell code

$hasher = [System.Security.Cryptography.SHA1]::Create()
$content = "textstring"
$toHash = [System.Text.Encoding]::UTF8.GetBytes($content)
$hash = [System.Convert]::ToBase64String($hasher.ComputeHash($toHash))
Write-Output ($filePath.ToString() + ": " + $hash)

In this example SHA1 hashing is used. For MD5 and SHA256 this works the same.

Updated: 2017-07-17