   generate_to_client : (cb) ->
     await @generate defer err, ret
     if not err? and ret?
-      ret = utils.base64u.encode ret
+      ret = encode ret
     cb err, ret
   
   #-----------------------------------------
 
-  pack_to_client : () -> utils.base64u.encode @_pack false
+  pack_to_client : () -> encode @_pack false
     
 ##=======================================================================
 

constants      = require './constants'
sc             = require('./status').codes
mm             = require('./mod').mgr

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



  _make_mac : (enc = null) ->
    msg = @_pack true
    key = decode @key
    hm = crypto.createHmac 'sha512', key
    hm.update msg
    hm.digest()
