Sleuth Kit Java Bindings (JNI)  4.6
Java bindings for using The Sleuth Kit
org.sleuthkit.datamodel.HashUtility Class Reference

Static Public Member Functions

static String calculateMd5 (AbstractFile file) throws IOException
 
static String calculateMd5Hash (Content content) throws IOException
 
static boolean isNoDataMd5 (String md5)
 
static boolean isValidMd5Hash (String md5Hash)
 
static boolean isValidSha1Hash (String sha1Hash)
 
static boolean isValidSha256Hash (String sha256Hash)
 

Detailed Description

Utility to calculate a hash for FsContent and store in TSK database

Definition at line 32 of file HashUtility.java.

Member Function Documentation

static String org.sleuthkit.datamodel.HashUtility.calculateMd5 ( AbstractFile  file) throws IOException
static

Calculate the MD5 hash for the given FsContent and store it in the database

Parameters
filefile object whose md5 hash we want to calculate
Returns
md5 of the given FsContent object
Exceptions
java.io.IOException
Deprecated:

Definition at line 131 of file HashUtility.java.

References org.sleuthkit.datamodel.HashUtility.calculateMd5Hash().

static String org.sleuthkit.datamodel.HashUtility.calculateMd5Hash ( Content  content) throws IOException
static

Calculate the MD5 hash for the given FsContent

Parameters
contentcontent object whose md5 hash we want to calculate
Returns
md5 of the given FsContent object
Exceptions
java.io.IOException

Definition at line 45 of file HashUtility.java.

Referenced by org.sleuthkit.datamodel.HashUtility.calculateMd5().

static boolean org.sleuthkit.datamodel.HashUtility.isNoDataMd5 ( String  md5)
static

Determine if the passed in Hash value is that for no data (i.e. an empty file). Looking these values up or correlating on them causes lots of false positives.

Parameters
md5
Returns
True if it is the empty hash value

Definition at line 114 of file HashUtility.java.

static boolean org.sleuthkit.datamodel.HashUtility.isValidMd5Hash ( String  md5Hash)
static

Determines whether a string representation of an MD5 hash is valid.

Parameters
md5HashThe hash.
Returns
True or false.

Definition at line 79 of file HashUtility.java.

static boolean org.sleuthkit.datamodel.HashUtility.isValidSha1Hash ( String  sha1Hash)
static

Determines whether a string representation of a SHA-1 hash is valid.

Parameters
sha1HashThe hash.
Returns
True or false.

Definition at line 90 of file HashUtility.java.

static boolean org.sleuthkit.datamodel.HashUtility.isValidSha256Hash ( String  sha256Hash)
static

Determines whether a string representation of a SHA-256 hash is valid.

Parameters
sha256HashThe hash.
Returns
True or false.

Definition at line 101 of file HashUtility.java.


The documentation for this class was generated from the following file:

Copyright © 2011-2018 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.