 
   _make_mac : (enc = null) ->
     msg = @_pack true
-    key = decode @key
-    hm = crypto.createHmac 'sha512', key
+    if not @key or @key.length is 0
+      throw new Error "Failing to make, since @key is empty"
+    hm = crypto.createHmac 'sha512', @key
     hm.update msg
     hm.digest()
 


  #-----------------------------------------

  generate_to_client : (cb) ->
    await @generate defer err, ret
    if not err? and ret?
      ret = encode ret
    cb err, ret
  
  #-----------------------------------------

  pack_to_client : () -> encode @_pack false
    
##=======================================================================


 
  #-----------------------------------------

  @from_client : (b, cfg) ->
    err = null
    ret = null
    klass = cfg.klass or SelfCertifiedToken
    if not Buffer.isBuffer(b) or b.length is 0
      err = "Failed to find a non-0 buffer"
    else if not ([e,x] = (utils.katch () -> unpack b))? or e?
      err = "Failed to purepack.unpack"
    else if not Array.isArray x
