       super(chunk, encoding, cb)
 
   _flush : (cb) ->
-    noop = () ->
     super(noop)
     @push(encrypt(new Buffer('')))
     cb()

exports.DecryptStream = class DecryptStream extends stream.ChunkStream
  decrypt = (chunk) ->
    ciphertext = parse_payload_packet(chunk, @header_hash, @mac_key, 'foo', @block_num)
    payload = @decryptor.secretbox_open({ciphertext, nonce.nonceForChunkSecretBox(@block_num)})
    ++@block_num
    return payload


nonce = require('./nonce.iced')

saltpack_block_len = (1024**2)
noop = () ->

exports.EncryptStream = class EncryptStream extends stream.ChunkStream
  encrypt = (chunk) ->
