Class EncryptionService
- Namespace
- JJMasterData.Commons.Security.Cryptography
- Assembly
- JJMasterData.Commons.dll
Wrapper to IEncryptionService with the secret key loaded by IOptions.
public class EncryptionService : IEncryptionService
- Inheritance
-
EncryptionService
- Implements
- Inherited Members
Constructors
EncryptionService(IEncryptionAlgorithm, IOptionsSnapshot<MasterDataCommonsOptions>)
Wrapper to IEncryptionService with the secret key loaded by IOptions.
public EncryptionService(IEncryptionAlgorithm encryptionAlgorithm, IOptionsSnapshot<MasterDataCommonsOptions> options)
Parameters
encryptionAlgorithm
IEncryptionAlgorithmoptions
IOptionsSnapshot<MasterDataCommonsOptions>
Methods
DecryptString(string, string?)
public string DecryptString(string cipherText, string? secretKey = null)
Parameters
Returns
EncryptString(string, string?)
public string EncryptString(string plainText, string? secretKey = null)