This repository has been archived on 2023-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
BirdsiteLIVE/src/BirdsiteLive.Domain/CryptoService.cs

26 lines
575 B
C#

using BirdsiteLive.Domain.Factories;
namespace BirdsiteLive.Domain
{
public interface ICryptoService
{
string GetUserPem(string id);
}
public class CryptoService : ICryptoService
{
private readonly IMagicKeyFactory _magicKeyFactory;
#region Ctor
public CryptoService(IMagicKeyFactory magicKeyFactory)
{
_magicKeyFactory = magicKeyFactory;
}
#endregion
public string GetUserPem(string id)
{
return _magicKeyFactory.GetMagicKey().AsPEM;
}
}
}