Skip to content

🔧 MD5Cng-style hashing in .NET Core/5+ (Linux/macOS)! Lightweight cross-platform method using System.Security.Cryptography for legacy checksums, data migrations, or .NET Framework upgrades. No Windows dependencies—ideal for CI/CD pipelines. Not crypto-safe! #dotnet #devops #legacy

License

Notifications You must be signed in to change notification settings

JavadEstiri/LegacyMD5CngInNetCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LegacyMD5CngInNetCore

🛠️ MD5Cng for .NET Core/5+ (Linux/macOS)

A cross-platform workaround to generate MD5 hashes using CNG-like behavior in modern .NET non-Windows environments.

🚀 Why This Exists

Microsoft removed MD5Cng from .NET Core/5+ and restricted it to Windows-only frameworks. This library fills the gap, enabling legacy systems or niche workflows (e.g., FIPS-compliant toolchains, backward-compatible integrations) to use MD5Cng-style hashing on Linux, macOS, and Docker with .NET 6/7/8.

đź’ˇ Key Features

âś… Cross-Platform MD5Cng Emulation: Mimic the deprecated MD5Cng API on non-Windows systems.

âś… CNG-like Behavior: Uses platform-native cryptography libraries (e.g., OpenSSL) under the hood.

âś… No Windows Dependencies: Works seamlessly in Linux/macOS CI/CD pipelines or containers.

âś… Legacy Compatibility: Migrate old .NET Framework codebases to modern .NET without rewriting hashing logic.

📜 Use Cases

Migrate enterprise apps relying on MD5Cng to .NET 8.

Maintain compatibility with legacy systems that require MD5 (e.g., checksums for non-security-critical tasks).

Debug/test FIPS-mode workflows in cross-platform environments.

⚠️ Caveats

MD5 is Insecure: Only use this for non-cryptographic purposes (e.g., checksums, legacy integrations). Not FIPS-Compliant: Mimics MD5Cng’s behavior but does not enforce FIPS rules.

About

🔧 MD5Cng-style hashing in .NET Core/5+ (Linux/macOS)! Lightweight cross-platform method using System.Security.Cryptography for legacy checksums, data migrations, or .NET Framework upgrades. No Windows dependencies—ideal for CI/CD pipelines. Not crypto-safe! #dotnet #devops #legacy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages