private CertProtectedEncryptor(string partition, AESEncryptor encryptor) { _partition = partition; _encryptor = encryptor; }
public void InvalidAESKeyCausesError() { Assert.Throws(typeof(CryptographicException), () => { var encryptor = new AESEncryptor(new byte[] { 20, 19, 29, 28, 13 }); var data = Encoding.UTF8.GetBytes("Test message of awesome"); var encypted = Convert.ToBase64String(encryptor.Encrypt(data)); }); }