Re: [PATCH 2/2] t6500: mark tests as SHA1 reliant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 30, 2017 at 11:00:19PM +0000, brian m. carlson wrote:
> Yes, basically, but a bit more generally.  There will always be cases in
> which we need to specify an object ID or an arbitrary string and the
> behavior will need to vary based on the hash.  That can be something
> like, in this case, the two blob contents that would have the similar
> prefix.
> 
> So in this case, we pass the helper the string "263 410" and get back a
> value for either the hacked SHA-1 hash or the SHA-256 or whatever we're
> using.

I realize this was worded poorly.  So for my example, in this case, we'd
do:

test-helper-hash-string "263 410"

For SHA-1, we'd get "263 410".  For SHA-256, we'd get "313 481" (which,
as SHA-256 blobs, both start with "17" in their hex representation).
Presumably we'd read some environment variable to determine the proper
value.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux