Examples - aegoroff/hc GitHub Wiki

Calculate SHA1 hash of string 123

hc sha1 string -s 123

Calculate SHA1 hash of a file

hc sha1 file -s file.txt

Calculate SHA1 hash of a file and output result in base64 form

hc sha1 file -s file.txt -b

Calculate SHA1 hash of the part of the file (the first kilobyte)

hc sha1 file -s file.txt -z 1024

Calculate SHA1 hash of the part of the file (one kilobyte skiping the first 512 bytes)

hc sha1 file -s file.txt -z 1024 -q 512

Validate file using it's SHA1 hash

hc sha1 file -s file.txt -m 8BD7954C40C1E59A900F71EA3A266732609915B1

Calculate SHA1 of all files in c:\dir directory

hc sha1 dir -s c:\dir

Calculate SHA1 of all files in c:\dir directory including all it's subdirectories

hc sha1 dir -r -s c:\dir

Calculate SHA1 of all files in c:\dir directory and output results in checksum file format

hc sha1 dir -s c:\dir --checksumfile

Calculate SHA1 of all files in c:\dir directory and save results to dir.sha1 in checksum file format

hc sha1 dir -s c:\dir --checksumfile -o dir.sha1

Calculate CRC32 of all files in c:\dir directory and save results to dir.sfv in SFV format

hc crc32 dir -s c:\dir --sfv -o dir.sfv

Calculate SHA1 of all exe files in c:\dir directory

hc sha1 dir -s c:\dir -i *.exe

Calculate SHA1 of all files in c:\dir directory excluding files with tmp extension

hc sha1 dir -s c:\dir -e *.tmp

Calculate SHA1 of all exe and dll files in c:\dir directory

hc sha1 dir -s c:\dir -i *.exe;*.dll

Calculate SHA1 of all exe files in c:\dir directory excluding files beginning with bad

hc sha1 dir -s c:\dir -i *.exe -e bad*

Searching file on C:\ drive using known SHA1 hash

hc sha1 dir -s c:\ -r -H 8BD7954C40C1E59A900F71EA3A266732609915B1

Restore string by it's SHA1 hash using default dictionary

hc sha1 hash -s 40BD001563085FC35165329EA1FF5C5ECBDBBEEF

Same as above (restore string by SHA1 hash) but hash in Base64 form

hc sha1 hash -b -s QL0AFWMIX8NRZTKeof9cXsvbvu8=

Restore string by it's SHA1 hash using user defined dictionary

hc sha1 hash -s 40BD001563085FC35165329EA1FF5C5ECBDBBEEF -a 0123456789

Restore string by it's SHA1 hash using user defined dictionary short form (only digits)

hc sha1 hash -s 40BD001563085FC35165329EA1FF5C5ECBDBBEEF -a 0-9

Restore string by it's SHA1 hash using user defined dictionary short form (low case latin letters)

hc sha1 hash -s 40BD001563085FC35165329EA1FF5C5ECBDBBEEF -a a-z

Restore string by it's SHA1 hash using user defined dictionary short form (digits, upper and low case latin letters)

hc sha1 hash -s 40BD001563085FC35165329EA1FF5C5ECBDBBEEF -a 0-9a-zA-Z

Restore string by it's SHA1 hash using user defined dictionary and string to restore min and max length

hc sha1 hash -s 40BD001563085FC35165329EA1FF5C5ECBDBBEEF -a 0123456789 -n 2 -x 6

Test performance SHA1 using default dictionary

hc sha1 hash -p

Test performance using user defined dictionary short form (only digits)

hc sha1 hash -p -a 0-9