namazso / OpenHashTab

📝 File hashing and checking shell extension
GNU General Public License v3.0
3.24k stars 124 forks source link

Sumfile default filenames #30

Closed mariomadproductions closed 3 years ago

mariomadproductions commented 3 years ago

If I checksum a single file, then click "export", the suggested sumfile filename is the same as the checksummed file. I think it would be better if something was appended to it. It could be customisable.

If I checksum multiple files, then click "export", the suggested sumfile filename is blank. Again, I think it would be better if there was an appropriate name there by default.

namazso commented 3 years ago

This is already the behavior for ones that have known sumfile extensions (listed here https://github.com/namazso/OpenHashTab/blob/master/OpenHashTab/Hasher.cpp#L275-L284 ).

What do you suggest for the rest?

mariomadproductions commented 3 years ago

Ah. For CRC32, it could be "sfv". For the others, it could just be the name of the hash, even if that's not a common file extension. For multiple hashes, it could just be "hashes".

Currently, if multiple files are selected, it just has the extension ".md5" suggested, without any "root". Maybe the root could again be "hashes" (e.g. "hashes.md5"), or maybe it should be named after the parent folder.

namazso commented 3 years ago

Ah. For CRC32, it could be "sfv".

sfvs aren't in sumfile format and thus unsupported as of now, both for export and "import" (checking). I'd prefer not to name it confusingly.

For the others, it could just be the name of the hash, even if that's not a common file extension.

hm.. I'll think about that. I don't like how .sha3 is sha3-512, but the rest would have .sha3-256 and the like.

Currently, if multiple files are selected, it just has the extension ".md5" suggested, without any "root". Maybe the root could again be "hashes" (e.g. "hashes.md5"), or maybe it should be named after the parent folder.

The parent folder thing is a good idea, although might not be trivial to implement. Windows (aka DOS) paths are very confusing things to deal with.

Darthagnon commented 3 years ago

HashCheck (2016) lists file extensions as follows:

CRC32 (*.sfv)
MD5 (*.md5)
SHA-1 (*.sha1)
SHA-256 (*.sha256)
SHA-512 (*.sha512)
SHA3-256 (*.sha3-256)
SHA3-512 (*.sha3-512)

checksum (2015) attempted to introduce a further standard for mixed hashes (i.e. all selected hashes: CRC32, MD5, etc. all in one file):

Mixed hashes (*.hash)

I rambled further about this in #32, which has a lot of crossover with this issue. (I like checksum's *.hash format idea, but the rest of that program is kinda annoying).

HashCheck uses checksums as the root for multiple files, e.g. checksums.md5 (otherwise filename.ext.md5 , e.g. MarioBros.zip.md5 for a single file). checksum uses filename.md5 for single files, and for multiple files, just makes loads of filename.md5 files (1 per file, rather than combining them into 1 sumfile as is standard; really annoying).

namazso commented 3 years ago

added a default filename base of checksums and a default extensions .sums for algorithms that don't have known export names. so now trying to export md2 will offer filename like checksums.sums.