  
   #-----------------------------------------
 
-  @from_client : (s, cfg) ->
+  @from_client : (b, cfg) ->
     err = null
     ret = null
     klass = cfg.klass or SelfCertifiedToken
-    if not (b = decode(s))? or b.length is 0
-      err = "Failed to base64-decode"
+    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


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

  constructor : ({@version, @id, @generated, @lifetime, @mac, @key, @addr, cfg}) ->
    if cfg?
      @key = cfg.key
      @lifetime = cfg.lifetime unless @lifetime

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


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

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

