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