more work on gtk & code cleanup

This commit is contained in:
2025-06-16 15:30:56 +02:00
parent 6f7bb5d92c
commit a49a3b2beb
69 changed files with 374 additions and 268 deletions

View File

@@ -44,8 +44,7 @@ public class SecureString
{
if (Crypter == null)
{
if (DefaultCrypter == null)
DefaultCrypter = new SimpleStringCrypter(string.Empty);
DefaultCrypter ??= new SimpleStringCrypter(string.Empty);
Crypter = DefaultCrypter;
}
return Crypter;
@@ -66,7 +65,7 @@ public class SecureString
}
public static implicit operator string(SecureString value) => value?.Value;
public static implicit operator SecureString(string value) => new SecureString(value, false);
public static implicit operator SecureString(string value) => new(value, false);
public static bool operator ==(SecureString left, SecureString right) => left?.EncryptedValue == right?.EncryptedValue;
public static bool operator !=(SecureString left, SecureString right) => left?.EncryptedValue != right?.EncryptedValue;