Table of Contents

Class EncryptionService

Namespace
Builvero.Infrastructure.Services
Assembly
Builvero.Infrastructure.dll

Service for encrypting and decrypting sensitive data at rest using AES encryption.

public class EncryptionService : IEncryptionService
Inheritance
EncryptionService
Implements
Inherited Members

Remarks

Uses AES-256-CBC encryption with a key derived from configuration. In production, the encryption key should be stored securely (e.g., AWS Secrets Manager).

Constructors

EncryptionService(IConfiguration)

public EncryptionService(IConfiguration configuration)

Parameters

configuration IConfiguration
Service for encrypting and decrypting sensitive data at rest using AES encryption.

Methods

Decrypt(string)

Decrypts an encrypted string value.

public string Decrypt(string ciphertext)

Parameters

ciphertext string
Service for encrypting and decrypting sensitive data at rest using AES encryption.

Returns

string
Service for encrypting and decrypting sensitive data at rest using AES encryption.

Encrypt(string)

Encrypts a string value.

public string Encrypt(string plaintext)

Parameters

plaintext string
Service for encrypting and decrypting sensitive data at rest using AES encryption.

Returns

string
Service for encrypting and decrypting sensitive data at rest using AES encryption.