supplierdeeply

Compute hashes in File Browser

  • 16 Replies
  • 1657 Views
Compute hashes in File Browser
« on: 23 / June / 2017, 15:48:52 »
Advertisements
Accessible via the file popup menu. Computes the following:
  • CRC-16
  • CRC-32
  • MD5
  • SHA-1
  • SHA-256
  • SHA-384
  • SHA-512
Source.

Edit: Added SHA-512.
Edit 2: Fixed truncation.
Edit 3: Added SHA-384.
Edit 4: Added CRC-32.
Edit 5: Added CRC-16.
« Last Edit: 23 / June / 2017, 21:09:39 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

Re: Compute hashes in File Browser
« Reply #1 on: 23 / June / 2017, 20:34:09 »
I tried adding CRC-64, but got this:

Quote
elf2flt unknown symbol: '__aeabi_llsr'

How can I work around it?
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline reyalp

  • ******
  • 11333
Re: Compute hashes in File Browser
« Reply #2 on: 23 / June / 2017, 22:55:00 »
I tried adding CRC-64, but got this:

Quote
elf2flt unknown symbol: '__aeabi_llsr'

How can I work around it?
See module_exportlist_eabi.inc and module_exportlist_elf.inc

Note the equivalent elf function probably has a different name, so you'll need to build with an elf compiler to find out. (we should probably drop ELF support at this point...)
Don't forget what the H stands for.

Re: Compute hashes in File Browser
« Reply #3 on: 23 / June / 2017, 23:39:36 »
See module_exportlist_eabi.inc and module_exportlist_elf.inc

Note the equivalent elf function probably has a different name, so you'll need to build with an elf compiler to find out. (we should probably drop ELF support at this point...)

Nope. I guess the camera doesn't support 64-bit operations...

Speaking of compiler prefixes, any particular reason this wasn't merged?
Author of CHIMP, Canon Hack Installation and Management Platform


*

Offline reyalp

  • ******
  • 11333
Re: Compute hashes in File Browser
« Reply #4 on: 24 / June / 2017, 00:50:02 »
Nope. I guess the camera doesn't support 64-bit operations...
It's not a matter of what the camera supports, neither gcc nor elf2flt know anything about that.

Did you do a full build (make clean all)?
« Last Edit: 24 / June / 2017, 19:21:52 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 11333
Re: Compute hashes in File Browser
« Reply #5 on: 24 / June / 2017, 00:55:36 »
Speaking of compiler prefixes, any particular reason this wasn't merged?
If people want changes in the official svn, they need to post them here, not on random personal github repos.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3070
    • Photos
Re: Compute hashes in File Browser
« Reply #6 on: 24 / June / 2017, 02:05:19 »
Accessible via the file popup menu. Computes the following:
  • CRC-16
  • CRC-32
  • MD5
  • SHA-1
  • SHA-256
  • SHA-384
  • SHA-512
Source.

Edit: Added SHA-512.
Edit 2: Fixed truncation.
Edit 3: Added SHA-384.
Edit 4: Added CRC-32.
Edit 5: Added CRC-16.

Ummm - why?

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)

Re: Compute hashes in File Browser
« Reply #7 on: 24 / June / 2017, 12:02:01 »
It's not a matter of what the camera supports, neither gcc nor elf2flt no anything about that.

I'm sorry I didn't clarify. The code would build, but the File Browser won't start.

Quote
Did you do a full build (make clean all)?

I'm assuming I don't have to re-upload DISKBOOT.BIN, since this is an assembly command. Am I wrong?
Author of CHIMP, Canon Hack Installation and Management Platform


Re: Compute hashes in File Browser
« Reply #8 on: 24 / June / 2017, 12:03:07 »
If people want changes in the official svn, they need to post them here, not on random personal github repos.

If I post this as a patch, will it be accepted?
Author of CHIMP, Canon Hack Installation and Management Platform

Re: Compute hashes in File Browser
« Reply #9 on: 24 / June / 2017, 12:08:22 »
Ummm - why?

Phil.

That's practically a no-brainer. md5 and sha1 were already there for eyefi, crc32 was a part of packfi2, and I already had sha2 adapted for the metadata generators. I picked crc16 from the Linux kernel.

I think this feature is at least as useful as "Replace CHDK" (which BTW happens to corrupt DISKBOOT.BIN if source == target).
Author of CHIMP, Canon Hack Installation and Management Platform

 

Related Topics