TypeRefHasher logo

TypeRefHasher G DATA CyberDefense AG

Use this command to install TypeRefHasher:
winget install --id=GDATA.TypeRefHasher -e

CLI tool to compute the TypeRefHash for .NET binaries.

TypeRefHasher is a command-line tool designed to compute the TypeRefHash for .NET binaries, enabling developers to quickly and accurately generate hashes that represent type references within assemblies.

Key Features:

  • Computes TypeRefHash values for .NET binaries (DLLs and EXEs).
  • Supports both JSON and plain text output formats for flexibility in integration.
  • Works across multiple platforms, including Windows, Linux, and macOS.
  • Designed with a focus on performance and reliability to handle large assemblies efficiently.
  • Can be seamlessly integrated into build pipelines or automated workflows.

Audience & Benefit:
Ideal for software developers, security researchers, and .NET ecosystem contributors who need to verify type compatibility, track changes in assemblies, or implement secure updates. By providing a standardized way to compute TypeRefHash values, this tool helps streamline development processes and ensures consistency across projects.

TypeRefHasher can be installed via winget, making it easy to integrate into your development environment.

README

TypeRef Hasher

license Build Test

CLI tool to compute the TypeRefHash (TRH) for .NET binaries.

Installation

There are multiple options to obtain the TypeRefHasher.

Windows

Install the tool with winget. The tool gets added to your PATH environment variable.

winget install GDATA.TypeRefHasher

Another option is to just download the binary or installer from the GitHub Releases tab

  1. trh.msi -> Windows x64 Installer (Allows uninstall and adds the tool to your PATH)
  2. trh.exe -> Windows x64 (Standalone binary)

Linux

Download the binary or installer from the GitHub Releases tab.

  1. trh -> Linux x64 (Standalone binary)

Usage

The usage is as straight forward as possible.

Windows:

> trh.exe file

Linux:

> trh file

In both cases the output is the TRH (example: 1defec485ab3060a9201f35d69cfcdec4b70b84a2b71c83b53795ca30d1ae8be) for the given file or an error message with a description why the hash could not be computed.

Build & Deploy

Find more information here

Versions
1.0.3
1.0.2
1.0.1
1.0.0
Website
License