Questions tagged [hashsum]

Questions related to hashes, hash values or hash codes that are returned by hash functions such as SHA-1.

A hash is any well-defined procedure or mathematical function that converts a large, possibly variable-sized amount of data into a small datum, usually a single integer representing the sum of the correct digits in a piece of stored or transmitted digital data, against which later comparisons can be made to detect errors in the data. The values returned by a hash function are called hash values, hash sums, checksums or simply hashes.

289 questions
26
votes
2 answers

Does the hash of a file change if the filename changes?

Does the hash of a file change if the filename or path or timestamp or permissions change? $ echo some contents > testfile $ shasum testfile 3a2be7b07a1a19072bf54c95a8c4a3fe0cdb35d4 testfile
tarabyte
  • 4,296
6
votes
4 answers

Echo hash only from shasum

Is there a way to get shasum to only print the hash? I know this can be achieved by piping the output to another program, e.g. shasum something | cut -d' ' -f1 Is there a way to achieve this only using shasum, without having to pipe the result…
Armand
  • 363
  • 1
  • 3
  • 9
5
votes
4 answers

is it possible to create a file given an md5 hash

I know this is a strange question, and I know that md5sum is nearly impossible to break... but I'm just wondering if someone here knows if it is possible to recreate a file given it's md5sum hash? I mean, not necessarily the same file as the…
icasimpan
  • 439
4
votes
2 answers

How to use md5sum for checksum with an md5 file which doesn't contain the filename

I have 2 files test.txt and test.txt.md5. I would like to verify the checksum of test.txt. The gnu tool md5sum requires an md5 file with the following format "[md5-hash][space][space][filename]" (md5sum -c test.txt.md5). Unfortunately my…
Kostas
  • 153
1
vote
1 answer

Update hash file when rechecking files

I'm currently saving each folder on a hash file with the following code find folder/ -type f -exec sha256sum {} > checksumfolder.txt \; I'm wondering if it is possible instead of checking/recalculating and recreating that txt file to just update…
Yareli
  • 11
1
vote
3 answers

Hash a file by 64MB blocks?

I have a very large file (200GB). Apparently when I transfer it over it did not copy correctly. The sha1 hash on both are different. Is there a way I can divide the file up to blocks (like 1MB or 64MB) and output a hash for each block? Then…
user4069
1
vote
1 answer

How to verify binary SHA checksum

I have a file.bin and file.bin.sha. The file.bin.sha has 32 bytes and contains binary data. How can I verify the checksum? sha256sum complains about no properly formatted SHA256 checksum lines found.
Pitel
  • 531
1
vote
1 answer

sha1sum reporting different hash value relative to openssl

Why the difference in the following? $ echo -n "foo" | openssl dgst -sha1 -hmac "key" (stdin)= 9fc254126c2b1b7f106abacae0cb77e73411fad7 $ echo -n "foo" | sha1sum 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 -
Marcus Junius Brutus
  • 4,587
  • 11
  • 44
  • 65
0
votes
1 answer

Extracting salt:hash from a text file

Currently, I don't seem to be able to find a script or guide online to find out how to extract the hash:salt into a text file. For…
0
votes
1 answer

inconsistent capitals in sha256

I've downloaded a windows 10 OS and tested the sha256, compared to what they report for English international 64 bit (left hand side): [ 06FD4A512C5F3E8D16F77CA909C4F20110329B8CDD5AD101E2AFC0D58B06D416 =…
0
votes
1 answer

Linux SHA1 Time Complexity

Is time complexity of Linux SHA1 linear? That means that 2GB file is hashed twice longer than 1GB file?
0
votes
1 answer

Is the difference between md5, sha1 and sha256 sums the less important the larger the file?

I am compressing a number of files with size in the order of 5GB before sharing them. On the one hand, I would like to provide a hash sum for the recipient to check the files' integrity. On the other hand, generating a sha256sum of a large file…
XavierStuvw
  • 1,119
0
votes
2 answers

get base64 value from openssl md5 command in script

I am trying to get the base64 md5 value of the latest file in an oracle backup directory: for file in "$(find /oracle/PD1/sapbackup/b*/ -newermt $date -type f)"; do openssl md5 -binary $file | base64 && echo $file…
0
votes
2 answers

MD5SUM for Copied File

Does the MD5SUM for a file change when I make a copy of the file? Example: $ md5sum file01.dmp $ cp file01.dmp file02.dmp $ md5sum file02.dmp Shouldn't the two MD5SUMs match?
oradbanj
  • 111
0
votes
2 answers

How to convert SHA to plain text?

I have found out, how I can convert plain text into an SHA (http://hash.online-convert.com/sha512-generator), but how can I convert a SHA key to plain text?
Romulus
  • 301
1
2