anchor.diff:           ,has_perm/2
           ]).
   
  --type perm() :: 'any_channel' | 'full_api' |
  +-type id() :: binary().
  +-type pass() :: binary().
  +-type reportable_perm() :: 'any_channel' | 'full_api'.
  +-type perm() :: reportable_perm() |
                   {'channel', logplex_channel:id()}.
   
  --record(cred, {id :: binary(),
  -               pass :: binary(),
  +-record(cred, {id :: id(),
  +               pass :: pass(),
                  perms = ordsets:new() :: ordsets:ordset(perm())
                 }).
   
  
positive.code: bytes_to_iolist(Bytes) ->
      << <<(hd(integer_to_list(Nib, 16))):8>> || <<Nib:4>> <= Bytes >>.
  
  from_dict(Id, Dict) ->
      dict:fold(fun cred_from_dict/3, new(Id), Dict).
  
  
negative.code: delete(Id) ->
      ets:delete(?CRED_TAB, Id).
  
  -spec lookup(id()) -> #cred{}.
  lookup(Id) ->
      case ets:lookup(?CRED_TAB, Id) of
          [Cred = #cred{}] -> Cred;
  