{"id":22422112,"url":"https://github.com/abumq/mine","last_synced_at":"2025-08-05T09:07:31.428Z","repository":{"id":52649479,"uuid":"100855398","full_name":"abumq/mine","owner":"abumq","description":"Minimal and single-header cryptography library (AES, RSA, Base16, Base64, ZLib), implemented for education purposes - use @abumq/ripe for production.","archived":true,"fork":false,"pushed_at":"2025-07-06T05:09:02.000Z","size":477,"stargazers_count":102,"open_issues_count":2,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-26T09:52:18.981Z","etag":null,"topics":["aes-128","aes-192","aes-256","aes-cbc","aes-ecb","base16","base64","cryptography","rsa","zlib"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abumq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2017-08-20T10:56:22.000Z","updated_at":"2025-07-15T14:23:11.000Z","dependencies_parsed_at":"2024-10-22T17:31:41.710Z","dependency_job_id":null,"html_url":"https://github.com/abumq/mine","commit_stats":{"total_commits":217,"total_committers":2,"mean_commits":108.5,"dds":"0.49769585253456217","last_synced_commit":"b2534c99a94a9210fcaaf4d739dbc3971d3f2fab"},"previous_names":["abumq/mine","amrayn/mine","zuhd-org/mine"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/abumq/mine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fmine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fmine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fmine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fmine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abumq","download_url":"https://codeload.github.com/abumq/mine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fmine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268866635,"owners_count":24320280,"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","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aes-128","aes-192","aes-256","aes-cbc","aes-ecb","base16","base64","cryptography","rsa","zlib"],"created_at":"2024-12-05T17:11:45.546Z","updated_at":"2025-08-05T09:07:31.359Z","avatar_url":"https://github.com/abumq.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  ﷽\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/abumq/mine\"\u003e\n      \u003cimg width=\"400px\" src=\"https://github.com/abumq/mine/raw/master/mine.png?\" /\u003e\n    \u003c/a\u003e\n    \u003cp align=\"center\"\u003eMinimal and single-header cryptography library (AES, RSA, Base16, Base64, ZLib)\u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca aria-label=\"Version\" href=\"https://github.com/abumq/mine/releases/latest\"\u003e\n    \u003cimg alt=\"\" src=\"https://img.shields.io/github/release/abumq/mine.svg?style=for-the-badge\u0026labelColor=000000\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"License\" href=\"https://github.com/abumq/mine/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"Apache 2.0\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge\u0026labelColor=220000\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nMine is fast, memory-efficient, single-header minimal cryptography implementation for small-medium projects that cannot afford to link to external libraries.\n\n## ⚠️ Archive Notice\nIt was created purely for **educational purposes** and should **not be used in production**.  \n\nI’d like to sincerely thank everyone who showed interest, or learned something from this project. Your support means a lot to me!\n  \nIf you're interested in what I'm currently building, follow me on GitHub to stay updated on new projects, tools, and ideas.  \n\n— Majid Q. ([@abumq](https://github.com/abumq))\n\n# Overview\nIt all started with [ripe](https://github.com/abumq/ripe) that depends on third-party library (initially OpenSSL then Crypto++) linked statically. However after deploying [residue](https://github.com/abumq/residue) with ripe to older distributions of linux, we learnt that portability is an issue for ripe as _minimal_ library (because of it's dependencies). So we started to implement standards forming _Mine_.\n\nI was very careful with my implementations and have over 50 [test cases](/test/) in-place.\n\n# Installation (API)\nSimply copy `mine.h` and `mine.cc` from [`package/`](/package/) directory to your project or your local machine.\n\nAlternatively, feel free to link it as shared or static library (you will need to compile yourself)\n\n# Installation (CLI Tool)\nYou can either download binary for your platform via [releases](https://github.com/abumq/mine/releases) page or using NPM\n\n```\nnpm install -g mine-linux@latest\nsudo ln -s `which mine-linux` /usr/local/bin/mine\n```\n\n```\nnpm install -g mine-darwin@latest\nsudo ln -s `which mine-darwin` /usr/local/bin/mine\n```\n\n# Features\nMine supports following features:\n\n * Base16 Encoding\n * Base64 Encoding\n * RSA [[RFC-3447](https://tools.ietf.org/html/rfc3447)]\n * AES [[FIPS Pub. 197](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197.pdf)]\n * ZLib (Depends upon libz)\n\nThis is what we are aiming for _minimal_ crypto library.\n\n# Notes\n\n * It is natively developed on macOS and Linux operating systems\n * It is fast with compiler optimization level 1 (or higher)\n * You need to implement BigNumber to use RSA, for unit tests we use [Integer from Crypto++](https://www.cryptopp.com/wiki/Integer)\n * RSA currently does not support signing \u0026 verification or reading keys from PEM files\n\n# Quick Reference\n\n### Base16\n\n * `mine::Base16::encode(str);`\n * `mine::Base16::encode(str.begin(), str.end());`\n * `mine::Base16::decode(encoding);`\n\n### Base64\n\n * `mine::Base64::encode(str);`\n * `mine::Base64::encode(str.begin(), str.end());`\n * `mine::Base64::decode(encoding);`\n * `mine::Base64::decode(encoding.begin(), encoding.end());`\n * `mine::Base64::expectedLength(n);`\n\n### AES\n\n ```c++\n std::string random256BitKey = mine::AES::generateRandomKey(256);\n\n mine::AES aesManager;\n aesManager.encrypt(b16Input, hexKey, mine::MineCommon::Encoding::Base16, mine::MineCommon::Encoding::Base64); // takes base16, encrypts and returns base64\n\n aesManager.setKey(random256BitKey); // now use this key\n aesManager.encr(b16Input, mine::MineCommon::Encoding::Base16, mine::MineCommon::Encoding::Base64); // don't need key with requests\n aesManager.decr(b64Input, mine::MineCommon::Encoding::Base64, mine::MineCommon::Encoding::Raw); // Returns raw string\n ```\n\n### ZLib\n\n * `mine::ZLib::compressString(str);`\n * `mine::ZLib::decompressString(str);`\n * `mine::ZLib::decompressFile(outputFile, inputFile);`\n\n# Contribution\nYou can contribute to the project by testing on various platforms (e.g, Windows, Android etc)\n\n# License\n\n```\nCopyright 2017-present @abumq (Majid Q.)\n\nhttps://github.com/abumq/mine\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n  [banner]: https://raw.githubusercontent.com/abumq/mine/master/mine.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabumq%2Fmine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabumq%2Fmine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabumq%2Fmine/lists"}