   #---------------
 
   sign : ({input, key}) ->
-    input = (new WordArray [ @version.n ]).concat input
+    input = (new WordArray @version.header ).concat input
     hmac.sign { key, input }
 
   #---------------

ctr           = require './ctr'
hmac          = require './hmac'
{SHA512}      = require './sha512'
{pack,unpack} = require 'purepack'
{pbkdf2}      = require './pbkdf2'

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

V1 = 
  n : 1
  pbkdf2_iters : 1024

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

    ct2  = @run_twofish { input : ct1, key : keys.twofish, iv : ivs.twofish }
    ct3  = @run_aes     { input : ct2, key : keys.aes,     iv : ivs.aes     }
    sig  = @sign        { input : ct3, key : keys.hmac                      }
    (new WordArray(@version.header)).concat(sig).concat(ct3).to_buffer()

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

