From 31b7313322f44bcd7f5daa8220c14137406f2564 Mon Sep 17 00:00:00 2001 From: h5p9sl Date: Fri, 30 Nov 2018 20:11:41 -0700 Subject: [PATCH] Fixed EncryptedString.Set( NULL ) error. --- Crypto Notepad/EncryptedString.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Crypto Notepad/EncryptedString.cs b/Crypto Notepad/EncryptedString.cs index 3e304c2..64280eb 100644 --- a/Crypto Notepad/EncryptedString.cs +++ b/Crypto Notepad/EncryptedString.cs @@ -38,6 +38,7 @@ public string Get() public void Set(string String) { + if (String == null) { this.encryptedString = null; return; } var encryptor = this.des.CreateEncryptor(); byte[] str = Encoding.Default.GetBytes(String); this.encryptedString = encryptor.TransformFinalBlock(str, 0, str.Length);