EnigmaCrypt.Net 1.0.2

dotnet add package EnigmaCrypt.Net --version 1.0.2
                    
NuGet\Install-Package EnigmaCrypt.Net -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EnigmaCrypt.Net" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EnigmaCrypt.Net" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="EnigmaCrypt.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EnigmaCrypt.Net --version 1.0.2
                    
#r "nuget: EnigmaCrypt.Net, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EnigmaCrypt.Net@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EnigmaCrypt.Net&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=EnigmaCrypt.Net&version=1.0.2
                    
Install as a Cake Tool

EnigmaCrypt.Net

EnigmaCrypt.Net is a .NET library that simulates the Enigma machine for encryption and decryption of messages. This library allows you to encrypt and decrypt messages using configurable rotors, a reflector, and a plugboard. It supports uppercase letters, spaces, and numbers

Installation

You can install the package via NuGet:

dotnet add package EnigmaCrypt.Net

Usage

To use EnigmaCrypt.Net, create an instance of EnigmaMachine with your desired rotor, reflector, and plugboard configurations. After initializing, you can call the Encrypt method to encrypt your message. The same method can be used to decrypt by passing the encrypted text. Below is a simple example:

using System;

public class Program
{
    public static void Main()
    {
        var rotorI = new Rotor("EKMFLGDQVZNTOWYHXUSPAIBRCJ", "Q");
        var rotorII = new Rotor("AJDKSIRUXBLHWTMCQGZNPYFVOE", "E");
        var rotorIII = new Rotor("BDFHJLCPRTXVZNYEIWGAKMUSQO", "V");
        var reflectorB = new Reflector("YRUHQSLDPXNGOKMIEBFZCWVJAT");

        var machine = new EnigmaMachine(
            new[] { rotorI, rotorII, rotorIII },
            reflectorB,
            new Plugboard("AE BF CK"),
            "QWE"
        );

        Console.WriteLine("Enter the message to encrypt:");
        string message = Console.ReadLine();

        string encrypted = machine.Encrypt(message);
        Console.WriteLine($"Encrypted message: {encrypted}");

        string decrypted = machine.Encrypt(encrypted); 
        Console.WriteLine($"Decrypted Message: {decrypted}");
    }
}

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 189 10/17/2024
1.0.1 142 10/17/2024
1.0.0 150 10/17/2024