{"id":18331989,"url":"https://github.com/mrousavy/bmppwd","last_synced_at":"2025-04-06T03:33:30.968Z","repository":{"id":78946168,"uuid":"80697228","full_name":"mrousavy/BmpPwd","owner":"mrousavy","description":"🔐 BmpPwd is a .NET Class Library for overloadable en/decrypting strings or binary data to a System.Drawing.Image","archived":false,"fork":false,"pushed_at":"2020-06-18T08:31:01.000Z","size":4223,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T16:21:18.592Z","etag":null,"topics":["bitmap","cryptography","decryption","encryption","image","password"],"latest_commit_sha":null,"homepage":"https://mrousavy.github.io/BmpPwd/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrousavy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"mrousavy","ko_fi":"mrousavy","custom":["https://paypal.me/mrousavy"]}},"created_at":"2017-02-02T05:43:07.000Z","updated_at":"2022-03-08T00:17:56.000Z","dependencies_parsed_at":"2023-02-24T23:00:17.368Z","dependency_job_id":null,"html_url":"https://github.com/mrousavy/BmpPwd","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrousavy%2FBmpPwd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrousavy%2FBmpPwd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrousavy%2FBmpPwd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrousavy%2FBmpPwd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrousavy","download_url":"https://codeload.github.com/mrousavy/BmpPwd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430838,"owners_count":20937873,"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":["bitmap","cryptography","decryption","encryption","image","password"],"created_at":"2024-11-05T19:36:45.316Z","updated_at":"2025-04-06T03:33:30.961Z","avatar_url":"https://github.com/mrousavy.png","language":"C#","funding_links":["https://github.com/sponsors/mrousavy","https://ko-fi.com/mrousavy","https://paypal.me/mrousavy","https://ko-fi.com/F1F8CLXG'"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://github.com/mrousavy/BmpPwd/blob/master/Images/Logo.png?raw=true\" width=\"42\"\u003e BmpPwd\n**BmpPwd** is a .NET Standard 2.0 class library for encrypting and decrypting plain text to an Image (see: [`System.Drawing.Common`](https://www.nuget.org/packages/System.Drawing.Common/))\n\n[![NuGet](https://img.shields.io/nuget/dt/BmpPwd.svg)](https://www.nuget.org/packages/BmpPwd/)\n\n\u003ca href='https://ko-fi.com/F1F8CLXG' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi2.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\nApplications like [LaZagne](https://github.com/AlessandroZ/LaZagne) can easily find stored **(and encrypted)** Passwords from various Applications. To prevent this, **BmpPwd** will convert your Text with your En/Decryption Algorithm of choice _(Default: Cipher)_ to a _System.Drawing.Image_ which contains your Text.\n\nTo decrypt a **BmpPwd-Encrypted Image**, a Program must know:\n   * Location of the stored Image\n   * BmpPwd Encryption Shape/Drawing Scheme\n   * BmpPwd Encryption Color Scheme\n   * BmpPwd Decryption Method\n   * En/Decryption Algorithm _(Default: Cipher)_\n   * Pass-Phrase/Key for En/Decryption Algorithm\n   * Random Salt for En/Decryption Algorithm\n\n[**Download the Demo Application** (.zip)](https://github.com/mrousavy/BmpPwd/releases/download/2.0.0/BmpPwdDemo.zip)\n\n### Install\n   + NuGet\n      * [BmpPwd is also available on NuGet!](https://www.nuget.org/packages/BmpPwd)   Install via NuGet Package Manager Console:\n      ```nuget\n      PM\u003e Install-Package BmpPwd\n      ```\n      or by browsing NuGet Marketplace for `BmpPwd`\n\n   + Manually\n      1. [Download the latest Library (.dll)](https://github.com/mrousavy/BmpPwd/releases/download/1.0.0.5/BmpPwd.dll)\n      2. Add the .dll to your Project   (Right click `References` in the Project Tree View, click `Add References` and `Browse` to the `.dll` File)\n\n# How to use\n\n## Using the default AES Cipher (Rijndael)\n\n\u003e Note: On .NET Core and .NET Standard the Rijndael Implementation uses a key block-size of `128` bytes. On .NET Framework `256` bytes are used. For compatibility reasons, BmpPwd uses `128` bytes on all platforms. See: [Cipher.cs](BmpPwd/Cipher.cs#L15). Use `BmpPwd.Encrypt` and supply a custom `Cipher()` instance with a custom `keysize` parameter.\n\n### Encrypt a string\n   * C#:\n   ```cs\n   using System.Drawing.Common;\n   using BmpPwd;\n   // ...\n   var encryptedImage = BmpPwd.BmpPwd.Encrypt(\"MyPassword\", \"The string to be encrypted\");\n   ```\n\n   * VB:\n   ```vb\n   Imports System.Drawing.Common\n   Imports BmpPwd\n   ' ...\n   Dim encryptedImage = BmpPwd.BmpPwd.Encrypt(\"MyPassword\", \"The string to be encrypted\")\n   ```\n\n**⚠️: Be careful when saving the Image to not use lossy image compression, like JPEG. Lossy-compressing the Image will result in losing details and results in an un-decryptable image. Save as PNG or BMP to maintain pixel quality.**\n\n### Decrypt an Image\n   * C#:\n   ```cs\n   using System.Drawing.Common;\n   using BmpPwd;\n   // ...\n   string decryptedText = BmpPwd.Decrypt(\"MyPassword\", encryptedImage);\n   ```\n\n   * VB:\n   ```vb\n   Imports System.Drawing.Common\n   Imports BmpPwd\n   ' ...\n   Dim decryptedText = BmpPwd.Decrypt(\"MyPassword\", encryptedImage)\n   ```\n\n## Custom Encryption Implementation\n\n### Implement your custom Encryption class\n   * C#:\n   ```cs\n   public class MyCryptoClass : ICrypto {\n       // Implement Encrypt(..) and Decrypt(..) here\n   }\n   ```\n\n   * VB:\n   ```vb\n   Public Class MyCryptoClass\n       Implements ICrypto\n           ' Implement Encrypt(..) and Decrypt(..) here\n   End Class\n   ```\n\n### Use\n   * C#:\n   ```cs\n   using System.Drawing.Common;\n   using BmpPwd;\n   // ...\n   var encryptedImage = BmpPwd.BmpPwd.Encrypt(\"MyPassword\",\n                                        \"The string to be encrypted\",\n                                        new MyCryptoClass(),\n                                        BmpPwd.DrawingScheme.Square,\n                                        BmpPwd.ColorScheme.BlueMixed);\n   ```\n\n   * VB:\n   ```vb\n   Imports System.Drawing.Common\n   Imports BmpPwd\n   ' ...\n   Dim encryptedImage = BmpPwd.BmpPwd.Encrypt(\n       \"MyPassword\",\n       \"The string to be encrypted\",\n       new MyCryptoClass(),\n       BmpPwd.DrawingScheme.Square,\n       BmpPwd.ColorScheme.BlueMixed)\n   ```\n\n# Screenshots\n\u003cimg src=\"https://github.com/mrousavy/BmpPwd/blob/master/Images/Screenshots.gif?raw=true\" alt=\"Screenshots in a gif\"\u003e\n\n\n\u003cimg src=\"https://github.com/mrousavy/BmpPwd/blob/master/Images/password.png?raw=true\" alt=\"The Password 'password' in Rainbow/Square\"\u003e\n\n# See also\n## Performance Benchmark\n\u003cimg src=\"https://github.com/mrousavy/BmpPwd/blob/master/Images/Benchmark.png?raw=true\" alt=\"Benchmark (BmpPwd: 23ms | Normal Text: 16ms)\"\u003e\n\n**BmpPwd** does perform nearly as good as normal **Cipher string encryption**.\n\nUse `Line` if you care about small performance benefits.\n\n\n# Thanks for using BmpPwd!\n\u003e License: [MIT](https://github.com/mrousavy/BmpPwd/blob/master/LICENSE) | mrousavy 2020\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrousavy%2Fbmppwd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrousavy%2Fbmppwd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrousavy%2Fbmppwd/lists"}