Class EncryptionService
AES-256 encryption service implementation.
public class EncryptionService : IEncryptionService
- Inheritance
-
EncryptionService
- Implements
- Inherited Members
Constructors
EncryptionService(IOptions<EncryptionSettings>)
public EncryptionService(IOptions<EncryptionSettings> settings)
Parameters
settingsIOptions<EncryptionSettings>
Methods
Decrypt(string)
Decrypts an encrypted string.
public string Decrypt(string cipherText)
Parameters
cipherTextstringBase64-encoded encrypted string.
Returns
- string
The decrypted plaintext.
Encrypt(string)
Encrypts a plaintext string.
public string Encrypt(string plainText)
Parameters
plainTextstringThe text to encrypt.
Returns
- string
Base64-encoded encrypted string.