         @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++

      message = oEvent.data.message
      self._handler[message] data

  sendFile: (params) ->
    @worker.postMessage message: 'file', file: params.file, chunkSize: Crypto.chunkSize

  sendChunk: (params) ->
    @worker.postMessage message: 'chunk', chunk: params.chunk, chunkNumber: params.chunkNumber

  finalize: (params) ->
    @worker.postMessage message: 'finalize'

class WorkerFallback extends BaseWorker
  constructor: (params) ->

      @_reader.readAsArrayBuffer blob
    return

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

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