Skip to content

Conversation

@maythamfahmi
Copy link
Collaborator

This pull request introduces a new CryptoNet.Examples project targeting .NET 10.0, along with comprehensive example code for AES and DSA cryptographic operations. It also adds detailed project instructions and contribution guidelines, and makes minor formatting improvements to documentation. The most significant changes are the addition of practical usage examples for the CryptoNet library, which will help users and contributors understand and test core cryptographic functionalities.

New Example Project and Usage Samples:

  • Added a new CryptoNet.Examples project (CryptoNet.Examples.csproj) targeting .NET 10.0, including references to the main CryptoNet package and test files for demonstration purposes.
  • Implemented ExampleAes.cs with multiple static methods demonstrating AES encryption/decryption scenarios: generating and saving keys, using raw or human-readable keys, and encrypting/decrypting files. Includes helper methods and data validation.
  • Implemented ExampleDsa.cs with static methods showing DSA signing and verification, including generation, saving/loading of key pairs, and signature validation.

Documentation and Contribution Guidelines:

  • Added .github/copilot-instructions.md, a detailed instruction manual covering project architecture, development workflows, coding conventions, migration guides, and common pitfalls for contributors and AI coding agents.
  • Expanded the CONTRIBUTING.md file with a new "Contributing" section, outlining ways to contribute and providing a resource link for new contributors.

Documentation Formatting Improvements:

  • Updated code block formatting in CONTRIBUTING.md from triple backticks with yaml to triple tildes for consistency and improved rendering. [1] [2] [3]

These changes collectively enhance the usability, maintainability, and accessibility of the CryptoNet library for both users and contributors.

- Introduced `Program.cs` to demonstrate DSA and AES examples.
- Added test files for AES and RSA examples including `.docx`, `.pdf`, `.png`, and `.xlsx`.
- Updated `CryptoNet.ExtPack` project to improve MD5 calculation and string comparison.
- Modified solution file to include the new `CryptoNet.Examples` project.
- Removed outdated contributing guidelines from `README.md`.
- Deleted `RELEASE-NOTES` file as it was no longer needed.
- Created various PowerShell scripts for build, code coverage, Docker setup, documentation generation, and NuGet validation.
- Added migration guide for transitioning from CryptoNet v2.4.0 to v3.4.3, detailing breaking changes and updates.
- Updated table of contents in documentation to include migration and examples sections.
Added `Example_6_Wokring_With_Special_Character_Text` to demonstrate encryption and decryption of text with special characters (e.g., emojis) using UTF-8 encoding. Updated `Program.cs` to include the new example and re-enable previously commented-out AES and RSA examples.

Modified `BytesToString` and `StringToBytes` in `ExtShared.cs` to use UTF-8 encoding instead of ASCII for better handling of non-ASCII characters. Updated `migration.md` with a TODO note about encrypting strings with special characters and suggested using byte arrays for clarity.
Refactored example methods to use PascalCase, added XML comments, and improved variable naming for clarity. Standardized key management APIs across AES, DSA, and RSA examples. Enhanced file encryption examples to support arbitrary file types.

Updated documentation with detailed examples, migration guides, and a new `tooling.md` for developer workflows. Improved CI/CD documentation and reusable workflow examples in `CONTRIBUTING.md`.

Added support for special characters in encryption examples and advanced PEM operations. Updated project structure to include a "Docs" project and additional documentation files. Enhanced code readability, consistency, and developer experience.
@maythamfahmi maythamfahmi self-assigned this Dec 8, 2025
@maythamfahmi maythamfahmi added the documentation Improvements or additions to documentation label Dec 8, 2025
@maythamfahmi maythamfahmi merged commit 22653d3 into main Dec 8, 2025
10 checks passed
@maythamfahmi maythamfahmi deleted the feature/#163-documentation-enhancement branch December 8, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants