final1
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SecureBank.API.Encryption
|
||||
{
|
||||
public class EncryptionConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public byte[] Key { get; private set; }
|
||||
public byte[] IV { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public EncryptionConfiguration(IConfiguration configuration)
|
||||
{
|
||||
Key = Encoding.UTF8.GetBytes(configuration.GetSection("Encryption")["Key"]);
|
||||
IV = Encoding.UTF8.GetBytes(configuration.GetSection("Encryption")["IV"]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user