 SALTPACK_BLOCK_LEN = (1024**2)
 noop = () ->
 
-# This is a raw NaCl stream - it doesn't implement msgpack, armoring, or anything like that. This should only ever be called inside the exposed EncryptStream class
+# This is a raw NaCl stream - it doesn't implement msgpack, armoring, or
+# anything like that. This should only ever be called inside the exposed
+# EncryptStream class
 class NaClEncryptStream extends stream.ChunkStream
 
   _write_header : (cb) =>

#   - a format stream which frames the payload and inserts spaces/line breaks where appropriate
# Both classes try to mimic stream-like interfaces:
#   - calling `stream.write(chunk, cb)` will write to the first stream in the pipeline
#   - calling `stream.end(cb)` will attach an end listener to the last stream in the pipeline and end the first stream - the callback will fire when all streams have ended
#   - calling `stream.pipe(dest)` will pipe the last stream in the pipeline to the given destination
#   - notably missing: it's not possible to do `other_stream.pipe(stream)`, instead use `other_stream.pipe(stream.first_stream)`

#===========================================================


    @_header_hash = null
    super({transform_func : @_encrypt, block_size : SALTPACK_BLOCK_LEN, readableObjectMode : true})

# This is a raw NaCl stream - it doesn't implement msgpack, armoring, or
# anything like that. This should only ever be called inside the exposed
# EncryptStream class
class NaClDecryptStream extends require('stream').Transform

  # as above, this function encrypts for a specific key and is passed to `node-chunk-stream`
