/// <summary> /// Copy constructor /// </summary> /// <param name="cf">another instance of CredentialFile class</param> public CredentialFile(CredentialFile cf) { // Generate random file name string salt = new GenerateSalt().RandomSalt(); m_FullFilePath = "UserAccount_" + salt + ".txt"; if (!File.Exists(m_FullFilePath)) { FileStream fs = File.Create(m_FullFilePath); fs.Close(); } // Copy the current user info // m_UserInfoDatabase = new List<UserInfo>(cf.m_UserInfoDatabase); this.SaveCredentialFile(); }
/// <summary> /// constructor /// </summary> public AuthManager() { m_File = new CredentialFile(); m_TokenMgr = new TokenManager(); }