File tree 1 file changed +12
-2
lines changed
src/Flow.Launcher.Plugin.ClipboardPlus.Core/Utils
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -179,9 +179,14 @@ public static string GetSha256(string s)
179
179
180
180
#region Encrypt & Decrypt
181
181
182
- private static string encryptKey = null ! ;
182
+ private static string encryptKey = string . Empty ;
183
183
public static string EncryptKey => encryptKey ;
184
184
185
+ private static string encryptKeyMd5 = string . Empty ;
186
+ public static string EncryptKeyMd5 => encryptKeyMd5 ;
187
+
188
+ private static bool initialized = false ;
189
+
185
190
/// <summary>
186
191
/// Initialize the AES key for encryption and decryption
187
192
/// </summary>
@@ -190,7 +195,12 @@ public static string GetSha256(string s)
190
195
/// </param>
191
196
public static void InitEncryptKey ( string key )
192
197
{
193
- encryptKey ??= key ;
198
+ if ( ! initialized )
199
+ {
200
+ encryptKey = key ;
201
+ encryptKeyMd5 = GetMd5 ( key ) ;
202
+ initialized = true ;
203
+ }
194
204
}
195
205
196
206
/// <summary>
You can’t perform that action at this time.
0 commit comments