I've resoved this by using SparkMD5 (https://github.com/satazor/
SparkMD5) , and use the psedo-code below:

var data1 = '1234qe2412eddadf24312312ddqwd';
var data2 = '5678123ljhlccwe12123121123111';

var spark1 = new SparkMD5();
spark1.append(data1);

var spark2 = new SparkMD5();
spark2._state = spark1._state;
spark2._buff = spark1._buff;
spark2._length = spark1._length;

spark2.append(data2);
var spark2Res = spark2.end();


On 2月14日, 下午1时37分, Rong Shen <[email protected]> wrote:
> but how to import the hash-till-pause back to the Hash Coder? I have
> not found an API in Node for that.
>
> On 2月13日, 下午8时02分, Damianos Mylonakis <[email protected]> wrote:
>
>
>
>
>
>
>
> > Save the hash-till-pause in some sort of database that every process
> > talks to.
>
> > On 02/13/2012 05:48 AM, Rong Shen wrote:
>
> > >   You can not expect the next part of file will go to the same Node
> > > process before when the file uploading working in resumable way.
> > > That is the reason why h.update(data) does not work in this manner
> > > (How could recovery a Hash object that worked before in another Node
> > > process even in another server?).
>
> > > On 2月12日, 下午10时33分, Ben Noordhuis<[email protected]>  wrote:
> > >> On Sun, Feb 12, 2012 at 08:28, Rong Shen<[email protected]>  wrote:
> > >>> I'm working on a resumable file upload program with Node.js.
> > >>> For the identity checking of the uploaded file, I'm looking for a MD5
> > >>> Hash Algorithm that could work in a resumable way.
> > >> You mean the built-in createHash() function?
>
> > >>    var h = crypto.createHash('md5');
> > >>    h.update(data);
> > >>    h.update(moreData);
> > >>    h.update(yetMoreData);
> > >>    var d = h.digest();

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to