[et-mgmt-tools] [patch] virt-convert add disk signature into virt-image format export

Joey Boggs jboggs at redhat.com
Wed Oct 1 14:37:17 UTC 2008


I'm done creating a sha256 hash setup should I offer more than just 
sha256for now? and checksum generation is off by default

Here's a preview.  Not sure how to catch the module import failure for 
hashlib though



Cole Robinson wrote:
> Daniel P. Berrange wrote:
>   
>> On Tue, Sep 30, 2008 at 05:39:13PM -0400, Joey Boggs wrote:
>>     
>>> Here's a sample that works, just want to verify it's alright. Is 64MB 
>>> too much/too little to read at one time?
>>>
>>>
>>> f = open("test.raw","r")
>>> m = sha.new()
>>> while 1:
>>>    chunk = f.read(65536)
>>>    if not chunk:
>>>        break
>>>    m.update(chunk)
>>> print m.hexdigest()
>>>       
>> Both md5 and sha1 are becoming obsolete, and indeed forbidden by some
>> of the more paranoid organizations. I'd recommend we go straight
>> to using at least sha256. Also the docs recommend using  hashlib module
>> directly, eg
>>
>>     import hashlib
>>
>>     m = hashlib.sha256()
>>     while 1:
>>       chunk = f.read(65536)
>>       if not chunk:
>>         break
>>       m.update(chunk)
>>     print m.hexdigest()
>>
>> Daniel
>>     
>
> Yeah, the only problem with hashlib is that it's python2.5
> only. But we could just catch the import error and disable
> the functionality if need be.
>
> As far as md5 or sha1, no comment, though we probably want
> to support whatever other config formats use (if any do
> indeed offer hash support).
>
> - Cole
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools at redhat.com
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: virt-convert-disk-signature-virtimage-10-1-1030.patch
Type: text/x-patch
Size: 2853 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20081001/65f830cf/attachment.bin>


More information about the et-mgmt-tools mailing list