refactor(RSAFactory): isEncrypted-Eingang von CreateDecryptor umbenennen in encrypt.
This commit is contained in:
parent
e0a6787a87
commit
324a5bdb1e
@ -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 { }
|
||||
|
||||
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user