refactor(RSAFactory): isEncrypted-Eingang von CreateDecryptor umbenennen in encrypt.

This commit is contained in:
Developer 02 2024-12-16 10:51:46 +01:00
parent e0a6787a87
commit 324a5bdb1e
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ namespace DigitalData.Core.Abstractions.Security
int? keySizeInBits = null,
string? password = null);
IRSADecryptor CreateDecryptor(string pem, string? issuer = null, string? audience = null, bool isEncrypted = false, RSAEncryptionPadding? padding = null);
IRSADecryptor CreateDecryptor(string pem, string? issuer = null, string? audience = null, bool encrypt = false, RSAEncryptionPadding? padding = null);
}
public interface IRSAFactory<TParams> : IRSAFactory { }

View File

@ -52,12 +52,12 @@ namespace DigitalData.Core.Security.Cryptographer
return new string(pemChars);
}
public IRSADecryptor CreateDecryptor(string pem, string? issuer = null, string? audience = null, bool isEncrypted = false, RSAEncryptionPadding? padding = null) => new RSADecryptor()
public IRSADecryptor CreateDecryptor(string pem, string? issuer = null, string? audience = null, bool encrypt = false, RSAEncryptionPadding? padding = null) => new RSADecryptor()
{
Pem = pem,
Issuer = issuer ?? string.Empty,
Audience = audience ?? string.Empty,
IsEncrypted = isEncrypted,
IsEncrypted = encrypt,
Padding = padding ?? RSAEncryptionPadding.OaepSHA256
};
}