     
 
 class WebWorker extends BaseWorker
+  _busy: false
+  _buffer: []
+
   constructor: (params) ->
     super params
     @worker = new Worker Crypto.workerSrc

      @_reader.readAsArrayBuffer blob
    return

  sendChunk: (params) ->
    @_hash.update params.chunk

  _bin2hex: (array) ->
    hexTab = '0123456789abcdef'

        @worker = new WorkerFallback

    update: (params) ->
      console.log typeof params.data
      if params.onProgress?
        @worker.setOnProgress(params.onProgress)
      @_chunks = true
      console.log "Crypto sending chunk to worker"
      @worker.sendChunk
        chunk: params.data
        chunkNumber: @_chunkNumber++
