Code smells
This commit is contained in:
parent
2af01b654d
commit
ac6b9634a5
2 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ using API.Entities;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace API.Data.Repositories;
|
namespace API.Data.Repositories;
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
public interface IMangaFileRepository
|
public interface IMangaFileRepository
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using API.DTOs.Koreader;
|
using API.DTOs.Koreader;
|
||||||
|
|
@ -39,7 +40,7 @@ public class KoreaderBookDtoBuilder : IEntityBuilder<KoreaderBookDto>
|
||||||
public KoreaderBookDtoBuilder WithDeviceId(string installId, int userId)
|
public KoreaderBookDtoBuilder WithDeviceId(string installId, int userId)
|
||||||
{
|
{
|
||||||
var hash = SHA256.HashData(Encoding.UTF8.GetBytes(installId + userId));
|
var hash = SHA256.HashData(Encoding.UTF8.GetBytes(installId + userId));
|
||||||
_dto.Device_id = hash.ToString();
|
_dto.Device_id = Convert.ToHexString(hash);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue