/**
  * Create a new Authenticator with the given information.
  * (@see serial(), @see secret())
  * @param string $serial The serial, same format as serial().
  * @param string $secret The secret key, same format as secret().
  * @param int $sync sync time in milliseconds (optionnal)
  * @return Authenticator the requested Authenticator
  */
 public static function factory($serial, $secret, $sync = null)
 {
     $authenticator = new Authenticator($serial, $secret);
     if (!is_null($sync)) {
         $authenticator->set_sync($sync);
     }
     return $authenticator;
 }