/// <summary> /// Initialises a new instance of <see cref="LoginAuthenticationService"/> with a specified dataAccess facade, cipher /// and key. /// </summary> /// <param name="dataAccess">The data access facade.</param> /// <param name="encryptionCipher">The encryption cipher.</param> /// <param name="key">The encryption key.</param> public LoginAuthenticationService(IDataAccessLayerFacade dataAccess, IEncryptionCipher encryptionCipher, string key) { _dataAccess = dataAccess; _encryptionCipher = encryptionCipher; _encryptionKey = key; }
/// <summary> /// Intialises an new default instance of <see cref="LoginAuthenticationService"/>. /// </summary> public LoginAuthenticationService() { _encryptionCipher = new RijnadelEncryptionCipher(); _dataAccess = new DataAccessLayerFacade(() => new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["HumanResources"].ConnectionString)); _encryptionKey = ConfigurationManager.AppSettings["EncryptionKey"]; }