Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions TypeIt4Me.Tests/CryptoServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ public void EncryptDecrypt_RoundTrip_PreservesPlaintext()
Assert.Equal(plaintext, decrypted);
}

[Fact]
public void Encrypt_ExceedsMaxPlainTextSize_ThrowsArgumentException()
{
var plaintext = new string('A', 10 * 1024 * 1024 + 1);
var pin = "testpin";
Assert.Throws<ArgumentException>(() => CryptoService.Encrypt(plaintext, pin));
}

[Fact]
public void EncryptDecrypt_UnicodeText_PreservesContent()
{
Expand Down
Loading