From c257ef5a6edbb753bbfa207460da86cc0c8c9982 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 28 Dec 2018 12:57:35 +0200 Subject: [PATCH] Simplified some names --- Crypto Notepad/EncryptedString.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Crypto Notepad/EncryptedString.cs b/Crypto Notepad/EncryptedString.cs index 1f0824d..c9dde26 100644 --- a/Crypto Notepad/EncryptedString.cs +++ b/Crypto Notepad/EncryptedString.cs @@ -13,31 +13,31 @@ class EncryptedString public EncryptedString(string String) { - this.des.GenerateIV(); - this.des.GenerateKey(); - this.Set(String); + des.GenerateIV(); + des.GenerateKey(); + Set(String); } public EncryptedString() { - this.des.GenerateIV(); - this.des.GenerateKey(); + des.GenerateIV(); + des.GenerateKey(); } public string Get() { - if (this.encryptedString == null) return null; - var decryptor = this.des.CreateDecryptor(); - byte[] output = decryptor.TransformFinalBlock(this.encryptedString, 0, this.encryptedString.Length); + if (encryptedString == null) return null; + var decryptor = des.CreateDecryptor(); + byte[] output = decryptor.TransformFinalBlock(encryptedString, 0, encryptedString.Length); return Encoding.Default.GetString(output); } public void Set(string String) { - if (String == null) { this.encryptedString = null; return; } - var encryptor = this.des.CreateEncryptor(); + if (String == null) { encryptedString = null; return; } + var encryptor = des.CreateEncryptor(); byte[] str = Encoding.Default.GetBytes(String); - this.encryptedString = encryptor.TransformFinalBlock(str, 0, str.Length); + encryptedString = encryptor.TransformFinalBlock(str, 0, str.Length); } } }