Table of Contents

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 IEncryptionAlgorithm
options IOptionsSnapshot<MasterDataCommonsOptions>

Methods

DecryptString(string, string?)

public string DecryptString(string cipherText, string? secretKey = null)

Parameters

cipherText string
secretKey string

Returns

string

EncryptString(string, string?)

public string EncryptString(string plainText, string? secretKey = null)

Parameters

plainText string
secretKey string

Returns

string