Nuget - Encryption using AES algorithm.
Step 1:
Get the NuGet package https://www.nuget.org/packages/Common.Security.AES
Security.CypherPassWord = "CypherPassWord";
- 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);
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);
Comments
Post a Comment