Skip to main content
net10.0net11.0

Parser and validator for Apache htpasswd files

Published
Jul 8, 2026
3mo ago
Total Downloads
1.1K
1,127

Install

dotnet add package Meziantou.Framework.Http.Htpasswd --version 2.0.1
ProductVersions
.NET
net10.0net11.0

README

Meziantou.Framework.Http.Htpasswd

This package parses Apache htpasswd files and verifies credentials.

Supported password formats:

  • bcrypt ($2a$, $2b$, $2y$)
  • Apache MD5 ($apr1$)
  • SHA-256 crypt ($5$)
  • SHA-512 crypt ($6$)
  • SHA-1 ({SHA})
  • plaintext
var htpasswd = HtpasswdFile.Parse("""
        alice:$2y$10$Q8mPjALzMV90Q6MlA4b9MOB7f1ehD6A0eTlM2P6xnQKibD4xWgRSO
        bob:{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=
        """);

var isAliceValid = htpasswd.VerifyCredentials("alice", "password");
var isBobValid = htpasswd.VerifyCredentials("bob", "password");

Changes from Previous Version

No structural changes between v2.0.0 and v2.0.1.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.