Re: [Ocf-linux-users] Computing SHA1 for large files
Brought to you by:
david-m
From: David M. <dav...@mc...> - 2012-06-21 23:56:32
|
Jivin Ajay Matai lays it down ... > At this point, I am wondering if it is even possible to use OCF SHA1 for any buffers greater than 32K? > If I call single CIOCCRYPT with 32K data block that works fine. > > If I break the same 32K block into 2 of 16k each and call CIOCCRYPT in a rolling fashion - the result is total garbage. Yes, I am not sure if it's possible myself, but I will look into it when I get a chance, just been very busy this week. > Also, not able to get anything bigger than 32K block working: get a ioctl: Invalid argument error. Yes, that limit is imposed by the OCF API. Cheers, Davidm > -----Original Message----- > From: Ajay Matai > Sent: Tuesday, June 19, 2012 4:02 PM > To: 'ocf...@li...' > Subject: Computing SHA1 for large files > > Hello, > I am a beginner at OCF interface. I have been trying to compute SHA1 hash for a large file (say 2GB). > > I thought, I could read the file say 8192 sized block at a time, call CIOCCRYPT with updated buffer. > In the end, call CIOCCRYPT one last time with src=NULL and len=0. > I should be able to get the mac back in the buffer pointed by mac. > > Tried it but this doesn't seem to work. What is the right way of working with large files and OCF framework. > > I know very basic question but any amount of googling and stack-overflowing didn't help. > > Thanks! > -ajay > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Ocf-linux-users mailing list > Ocf...@li... > https://lists.sourceforge.net/lists/listinfo/ocf-linux-users > > -- David McCullough, dav...@mc..., Ph:+61 734352815 McAfee - SnapGear http://www.mcafee.com http://www.uCdot.org |