Calculate Hash

Verb: hashCalculate

Available from: <Standard>

Calculates the hash code of a text or file based on a hash function.

A hash function is an algorithm that maps variable length data to fixed length data.


hashCalculate [--isfromfile(Boolean)] --filename(String) --text(String) [--type(HashType)] (String)=value


Script Designer Required AcceptedTypes Description
--isfromfile Use File Optional Boolean When enabled, allows using the File parameter, therefore allowing entering a file as input.
--filename File Only whenUse File is True Text Full path of the text file used to calculate hash code.
--text Text Only whenUse File is False Text Text used to calculate hash code.
--type Hash Function Optional HashType Hash function options used for hash code calculation:
  • CRC32
  • MD5
  • RIPMD160
  • SHA1
  • SHA256
  • SHA384
  • SHA512
  • Outputs

    Script Designer AcceptedTypes Description
    value Hash code Text Returns the hash code calculated at File or Text.


    The Calculate Hash command is used to calculate and returns the hash code of the text "IBM Robotic Process Automation".

    defVar --name textHash --type String
    // Calculate the hash of the text "IBM".
    hashCalculate --text "IBM" --type "MD5" textHash=value
    logMessage --message "${textHash}\r\n" --type "Info"
    // This example produces the following result:
    // "3d6fb8586714efefcbee019a276d2a2b"

    See Also

  • Add Escape Characters to Regular Expression
  • Add Escape Characters to Text
  • Change Text Case
  • Check File
  • Compare Two Files
  • Concatenate Texts
  • Convert HTML to Text
  • Count Occurrences in Text
  • Count Text Characters
  • Create Random Text
  • Create Table By Regular Expression
  • Empty or Null Text Variable
  • Find by Regular Expression
  • Find Occurrences in Text
  • Format Text
  • Get Subtext
  • Get Text from Regular Expression
  • HTML to Markdown
  • Insert New Line to Text
  • Join Text
  • Pad Text
  • Parse URI
  • Remove Diacritics
  • Remove Escape Characters
  • Replace Part of Text
  • Replace Text
  • Split Text
  • Trim Text Blanks