-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: password encryption implementation
- Loading branch information
1 parent
2b92ddd
commit 56d59da
Showing
8 changed files
with
34 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/MyRecipes.Domain/Security/Cryptography/IPasswordEncripter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace MyRecipes.Domain.Security.Cryptography; | ||
public interface IPasswordEncripter | ||
{ | ||
public string Encrypt(string password); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ervices/Cryptography/PasswordEncripter.cs → .../Security/Cryptography/Sha512Encripter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
tests/CommonTestsUtilities/Cryptography/PasswordEncripterBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
using MyRecipes.Application.Services.Cryptography; | ||
using MyRecipes.Domain.Security.Cryptography; | ||
using MyRecipes.Infrastructure.Security.Cryptography; | ||
|
||
namespace CommonTestsUtilities.Cryptography; | ||
|
||
public class PasswordEncripterBuilder | ||
{ | ||
public static PasswordEncripter Build() => new("ABC1234"); | ||
public static IPasswordEncripter Build() => new Sha512Encripter("ABC1234"); | ||
} |