20 lines
325 B
C#
20 lines
325 B
C#
|
using API.Hashing.Interfaces;
|
||
|
using DAL.Models;
|
||
|
|
||
|
namespace API.Hashing
|
||
|
{
|
||
|
public class HashingFactory : IHashingFactory
|
||
|
{
|
||
|
public IHashingAlgorithm? getAlgorithm(HashingType type)
|
||
|
{
|
||
|
switch (type)
|
||
|
{
|
||
|
case HashingType.PBKDF2_SHA512_64_250000:
|
||
|
return new Pbkdf2();
|
||
|
default:
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|