using Microsoft.EntityFrameworkCore; using Shadow.Data; using Shadow.Entities; using System.Text; namespace Shadow.Controllers; public class GeneralUseHelpers(ApplicationDbContext db, IConfiguration appsettings) { private readonly ApplicationDbContext _db = db; private readonly IConfiguration _appsettings = appsettings; //async public Task GetUserFromEmail(string email) //{ // return await _db.Users.FirstOrDefaultAsync(e => e.Email == email); //} //public string HashWithSHA512(string s) //{ // using (var sha512 = SHA512.Create()) // { // byte[] bytes = Encoding.ASCII.GetBytes(s); // byte[] hash = sha512.ComputeHash(bytes); // string hashstring = BitConverter.ToString(hash).Replace("-", "").ToLower(); // return hashstring; // } //} }