Posts

Showing posts with the label NuGet

Nuget - Encryption using AES algorithm.

 A simple nuget for encrypting and decrypting data using AES algorithm in .NET and C#     Step 1:  Get the NuGet package https://www.nuget.org/packages/Common.Security.AES Set the property with a string Security.CypherPassWord   Security.CypherPassWord = "CypherPassWord";    Step 2: Just call the methode for  Encrypt var encriptByteArray = Encryption.Security.Encrypt(planetext); var encriptHexTest = Encryption.Security.EncryptAsHex(planetext);  Step 3: Just call the methode for  Decrypt    var planetext = Encryption.Security.Decrypt(encriptByteArray);  var planetext = Encryption.Security.DecryptFromHex(encriptHexTest);

Email Providers

Step 1: Get the NuGet  package    Click here... Step 2 :             string userName = "userName ";             string password = "password ";             var data = SmtpConfig.ForSendGrid(userName, password);             SmtpEmailProvider obj = new SmtpEmailProvider(data);             var email = new Email()             {                 ReceiverName = "ReceiverName ",                 ToAddress = "ToAddress @domain.com",                 SenderName = "SenderName",                 FromAddress = "FromAddress @domain.com",                 Message = "Message ",                 Subject = "Subject ",                 IsHtmlEmail = false              };             var re = obj.Send(email); There are many Smtp setting available. ForGoDaddy ForGmail ForOutlook ForMailGun ForSendGrid Happy Coding... :)

NuGet - Common Security

Step 1: Get the NuGet package  https://www.nuget.org/packages/Common.Security/ Set the property with a string Security.CypherPassWord Security.CypherPassWord = "CypherPassWord"; Call the static method for  Security.Encrypt()  syntax :       Security.Encrypt(planeText,password) Call the static method for  Security.Decrypt()  syntax :       Security.Decrypt(planeText,password)

NuGet - Common Database Settings

NuGet Common Database Settings Step 1:  get the nuget package https://www.nuget.org/packages/CommonDatabaseSettings Step 2: Make a object for DataBase class. (you can see many Method ) Call the method named CheckDatabaseConnection . Note : you can get the connection sting by calling DataBase.ConnectionString That's all, select which type of database to be connected. More over there are many methods in the BataBase class. Function Description Return type GetConnectionString(string) Set the database connection string void CheckDatabaseConnection(string) Check the connection string existing or not bool CheckDataExist(string) Check the data is present in the table bool DropdownFill(string) Fill the a Dropdown DataTable ExecuteDB(string) Can insert, update and delete data in the database void GetData(string) Get a strin