You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Karsten Hahn edited this page Mar 17, 2021
·
3 revisions
The import hash will be available in release 3.0.0 of PortEx.
It provides the same hashes as the pefile implementation which seems to be the commonly used algorithm, e.g., on Virustotal.
import package com.github.katjahahn.tools;
File file = new File("WinRar.exe");
// Get hash as byte array
byte[] imphashArray = ImpHash.calculate(file);
// Get hash as hex string
String imphashStr = ImpHash.createString(file);
System.out.println(imphashStr);