You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using TestBase = Comments.Test.Infrastructure.TestBase;
namespace Comments.Test.UnitTests
{
public class EncryptionTests : TestBase
{
[Fact]
public void Encrypt_And_Decrypt_String()
{
//Arrange
string original = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id ullamcorper massa. Integer ut tincidunt sapien. Vivamus tincidunt dui ac blandit blandit. Pellentesque id commodo purus. Nulla pulvinar est et ultricies tincidunt. Nulla eget semper nisl. Mauris non posuere mi, et condimentum augue. Quisque erat libero, gravida quis arcu non, lobortis porttitor quam. Suspendisse cursus lorem turpis, at ullamcorper quam ornare ut.";
string encrypted, decrypted = null;
var encryption = new Encryption();
//Act
using (Aes myAes = Aes.Create()) // Create a new instance of the Aes class. This generates a new key and initialization vector (IV).