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);