=head1 NAME

afsperlka - ka (Authentication Server) functions

=head1 SYNOPIS

  use AFS;              # import all AFS names
  use AFS @AFS::KA;     # import just the ka names

  ka_UserAthenticateGeneral
  ka_ParseLogin
  ka_StringToKey
  ka_des_string_to_key
  ka_ReadPassword
  ka_UserReadPassword
  ka_LocalCell;
  ka_ExpandCell
  ka_CellToRealm
  ka_GetAuthToken
  ka_GetAdminToken
  ka_nulltoken
  ka_AuthServerConn
  ka_SingleServerConn

  $kas -> getentry
  $kas -> listentry
  $kas -> create
  $kas -> delete
  $kas -> randomkey
  $kas -> debug
  $kas -> getstats
  $kas -> setpassword


  $kas -> KAM_GetEntry
  $kas -> KAM_Debug
  $kas -> KAM_GetStats
  $kas -> KAM_GetRandomKey
  $kas -> KAM_CreateUser
  $kas -> KAM_SetPassword
  $kas -> KAM_DeleteUser
  $kas -> KAM_ListEntry
  $kas -> KAM_SetFields

  $kas -> ka_ChangePassword
  $kas -> ka_Authenticate
  $kas -> ka_GetToken

=head1 DESCRIPTION

This document describes the KAS (Kerberos Authenication Server) functions
available in the AFS module.



=head1 $ok = ka_UserAthenticateGeneral($princ, $pass, $life, $flags 
                                          [,$pwexpires [,$reason]]);

=head1 ($name, $inst, $cell) = ka_ParseLoginName($login);

  Parse user­entered login name; calls ka_ParseLoginName

=head1 $DESKEY = ka_StringToKey($str, $cell=0);

  Calls the AFS/Andrew string-to-key function.

=head1 $DESKEY  = ka_des_string_to_key($str);

  Calls the des_string_to_key function, returns AFS::KTC_ENCRYPTIONKEY object.

=head1 $key = ka_ReadPassword($prompt, $verify=0, $cell=0);

  Reads password and converts to DES key.

=head1 $pass = ka_UserReadPassword($prompt [,$reason]);

  Reads password and returns as string. Returns undef and sets $AFS::CODE
  on error.

=head1 $cell = ka_LocalCell;

=head1 $cell = ka_ExpandCell($c);

=head1 $realm = ka_CellToRealm($c);

=head1 $ok = ka_GetAuthToken($princ,$key, $life [, $pwexpires]);

=head1 $token = ka_GetAdminToken(ktc_principcal, key, life, $new=1);

=head1 $token = ka_GetServerToken(ktc_principcal, life);

  Returns a token for a server.

=head1 ka_nulltoken

  Returns NULL token for use with ka_AuthServerConn or ka_SingleServerConn
  (to get an authenticated connection). Do not use with any other routines.

=head1 $kas = ka_AuthServerConn($token, $service [,$cell]);

=head1 $kas = ka_SingleServerConn($host,$token, $service [, $cell]);

=head1 $entry = $kas -> getentry($user,$inst);

=head1 ($user,$inst) = $kas -> listentry($context [,$count]);

=head1 $ok  = $kas ->create($name, $instance, $deskey);

=head1 $ok  = $kas ->delete($name, $instance);

=head1 $key = $kas ->randomkey();

=head1 $entry = $kas ->debug();

=head1 ($num_admins, $stats, $dstats) = $kas -> getstats;

=head1 $ok  = $kas ->setpassword($name, $instance, $kvno, $deskey);

=head1 $ok  = $kas ->ka_ChangePassword($name, $instance, $oldkey, $newkey);

=head1 $token = $kas -> ka_Authenticate($name, $inst, $service, $key, 
                                             $start, $end [, $pwexpires]);

=head1 $token = $kas -> ka_GetToken($name, $inst, $start, $end, 
                                         $auth_token [, $auth_domain]);
