function ImportTokensFile(
      $file,
      $original_name = '',
      $cipher_password = '',
      $key_mac = ""
  ) {
      if (!file_exists($file)) {
          $result = FALSE;
      } else {
          $data1000 = @file_get_contents($file, FALSE, NULL, 0, 1000);
          $file_name = ('' != $original_name)?$original_name:$file;
          if (FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('"urn:ietf:params:xml:ns:keyprov:pskc"'))) {
              $result = $this->ImportTokensFromPskc($file, $cipher_password, $key_mac);
          } elseif (FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('LOGGING START'))) {
              $result = $this->ImportYubikeyTraditional($file);
          } elseif ((FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('AUTHENEXDB'))) && ('.sql' == mb_strtolower(substr($file_name, -4)))) {
              $result = $this->ImportTokensFromAuthenexSql($file);
          } elseif ((FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('SafeWord Authenticator Records'))) && ('.dat' == mb_strtolower(substr($file_name, -4)))) {
              $result = $this->ImportTokensFromAlpineDat($file);
          } elseif (FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('<ProductName>eTPass'))) {
          // elseif (('.xml' == mb_strtolower(substr($file_name, -4))) && (FALSE !== mb_strpos(mb_strtolower($file_name), 'alpine')))
              $result = $this->ImportTokensFromAlpineXml($file);
          } elseif ('.xml' == mb_strtolower(substr($file_name, -4))) {
              $result = $this->ImportTokensFromXml($file);
          } else {
              $result = $this->ImportTokensFromCsv($file);
          }
      }
      return $result;
  }
function ImportTokensFile(
      $file,
      $original_name = '',
      $cipher_password = '',
      $key_mac = ""
  ) {
      if (!file_exists($file)) {
          $result = FALSE;
      } else {
          $data1000 = @file_get_contents($file, FALSE, NULL, 0, 1000);
          $file_name = ('' != $original_name)?$original_name:$file;
          if (FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('"urn:ietf:params:xml:ns:keyprov:pskc"'))) {
              $result = $this->ImportTokensFromPskc($file, $cipher_password, $key_mac);
          } elseif (FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('LOGGING START'))) {
              $result = $this->ImportYubikeyTraditional($file);
          } elseif ((FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('AUTHENEXDB'))) && ('.sql' == mb_strtolower(substr($file_name, -4)))) {
              $result = $this->ImportTokensFromAuthenexSql($file);
          } elseif ((FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('SafeWord Authenticator Records'))) && ('.dat' == mb_strtolower(substr($file_name, -4)))) {
              $result = $this->ImportTokensFromAlpineDat($file);
          } elseif (FALSE !== mb_strpos(mb_strtolower($data1000), mb_strtolower('<ProductName>eTPass'))) {
          // elseif (('.xml' == mb_strtolower(substr($file_name, -4))) && (FALSE !== mb_strpos(mb_strtolower($file_name), 'alpine')))
              $result = $this->ImportTokensFromAlpineXml($file);
          } elseif ('.xml' == mb_strtolower(substr($file_name, -4))) {
              $result = $this->ImportTokensFromXml($file);
          } else {
              $result = $this->ImportTokensFromCsv($file);
          }
      }
      return $result;
  }
function ImportTokensFile ( $ file , $ original_name = '' , $ cipher_password = '' , $ key_mac = "" ) { if ( ! file_exists ( $ file ) ) { $ result = FALSE ; } else { $ data1000 = @ file_get_contents ( $ file , FALSE , NULL , 0 , 1000 ) ; $ file_name = ( '' != $ original_name ) ? $ original_name : $ file ; if ( FALSE !== mb_strpos ( mb_strtolower ( $ data1000 ) , mb_strtolower ( '"urn:ietf:params:xml:ns:keyprov:pskc"' ) ) ) { $ result = $ this -> ImportTokensFromPskc ( $ file , $ cipher_password , $ key_mac ) ; } elseif ( FALSE !== mb_strpos ( mb_strtolower ( $ data1000 ) , mb_strtolower ( 'LOGGING START' ) ) ) { $ result = $ this -> ImportYubikeyTraditional ( $ file ) ; } elseif ( ( FALSE !== mb_strpos ( mb_strtolower ( $ data1000 ) , mb_strtolower ( 'AUTHENEXDB' ) ) ) && ( '.sql' == mb_strtolower ( substr ( $ file_name , - 4 ) ) ) ) { $ result = $ this -> ImportTokensFromAuthenexSql ( $ file ) ; } elseif ( ( FALSE !== mb_strpos ( mb_strtolower ( $ data1000 ) , mb_strtolower ( 'SafeWord Authenticator Records' ) ) ) && ( '.dat' == mb_strtolower ( substr ( $ file_name , - 4 ) ) ) ) { $ result = $ this -> ImportTokensFromAlpineDat ( $ file ) ; } elseif ( FALSE !== mb_strpos ( mb_strtolower ( $ data1000 ) , mb_strtolower ( '<ProductName>eTPass' ) ) ) { // elseif (('.xml' == mb_strtolower(substr($file_name, -4))) && (FALSE !== mb_strpos(mb_strtolower($file_name), 'alpine'))) $ result = $ this -> ImportTokensFromAlpineXml ( $ file ) ; } elseif ( '.xml' == mb_strtolower ( substr ( $ file_name , - 4 ) ) ) { $ result = $ this -> ImportTokensFromXml ( $ file ) ; } else { $ result = $ this -> ImportTokensFromCsv ( $ file ) ; } } return $ result ; }
End of SelfRegisterHardwareToken
End of SelfRegisterHardwareToken