{"id":17717728,"url":"https://github.com/mununki/passwordhasher.sha256.asp.net.core.identity","last_synced_at":"2025-03-31T12:26:13.485Z","repository":{"id":143922225,"uuid":"206704094","full_name":"mununki/PasswordHasher.SHA256.ASP.NET.CORE.Identity","owner":"mununki","description":"A NuGet package to use the custom password hasher - SHA256 \u0026 BASE64 encoding","archived":false,"fork":false,"pushed_at":"2019-09-06T08:16:35.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-04-24T03:22:04.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mununki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-06T03:20:07.000Z","updated_at":"2024-04-24T03:22:04.890Z","dependencies_parsed_at":"2023-06-03T11:30:14.936Z","dependency_job_id":null,"html_url":"https://github.com/mununki/PasswordHasher.SHA256.ASP.NET.CORE.Identity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2FPasswordHasher.SHA256.ASP.NET.CORE.Identity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2FPasswordHasher.SHA256.ASP.NET.CORE.Identity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2FPasswordHasher.SHA256.ASP.NET.CORE.Identity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2FPasswordHasher.SHA256.ASP.NET.CORE.Identity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mununki","download_url":"https://codeload.github.com/mununki/PasswordHasher.SHA256.ASP.NET.CORE.Identity/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246467188,"owners_count":20782274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-25T14:29:47.853Z","updated_at":"2025-03-31T12:26:13.456Z","avatar_url":"https://github.com/mununki.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PasswordHasher.SHA256.ASP.NET.CORE.Identity\n\nThis is a package to use the custom password hasher with `SHA256` algorithm and `base64` encoding for IdentityServer4 or any `ASP.NET Core` project using `Microsoft.AspNetCore.Identity` dependency.\n\n\u003e Generated hashed value structure\n\n```\n[SHA256 hashed + BASE64 encoded password]$[Guid salt]\n\n# e.g. W9G4GjOAE47HKq2ktI/RXhYBgqv5vIsWYF5GfR5jy7o=$e6126315-2425-4aa2-bfba-0986e49590e8\n```\n\nThe salt value after `$`  which was generated using `System.Guid` will be used to verify the password which is input by user.\n\n## Installation\n\n### dotnet CLI\n\n```shell\n$ dotnet add package PasswordHasher.SHA256.ASP.NET.CORE.Identity\n```\n\n### NuGet\nhttps://www.nuget.org/packages/PasswordHasher.SHA256.ASP.NET.CORE.Identity\n\n## Usage\n\n```csharp\n// Startup.cs\n\nusing SHA256Hasher;\n\npublic void ConfigureServices(IServiceCollection services)\n{\n    var connectionString = Configuration.GetConnectionString(\"DefaultConnection\");\n    var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;\n\n    // ADD CustomPasswordHasher\n    services.AddTransient\u003cIPasswordHasher\u003cIdentityUser\u003e, CustomPasswordHasher\u003e();\n    \n    // omit the rest of codes\n```\n\n## Demo\n\n```shell\n$ cd console\n$ dotnet run\n\n# The provided password \"StrongPassw0rd!\"\n\nHashedValue \u003e W9G4GjOAE47HKq2ktI/RXhYBgqv5vIsWYF5GfR5jy7o=$e6126315-2425-4aa2-bfba-0986e49590e8\nVerify \u003e Success\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmununki%2Fpasswordhasher.sha256.asp.net.core.identity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmununki%2Fpasswordhasher.sha256.asp.net.core.identity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmununki%2Fpasswordhasher.sha256.asp.net.core.identity/lists"}