EnigmaCrypt.Net
1.0.2
dotnet add package EnigmaCrypt.Net --version 1.0.2
NuGet\Install-Package EnigmaCrypt.Net -Version 1.0.2
<PackageReference Include="EnigmaCrypt.Net" Version="1.0.2" />
<PackageVersion Include="EnigmaCrypt.Net" Version="1.0.2" />
<PackageReference Include="EnigmaCrypt.Net" />
paket add EnigmaCrypt.Net --version 1.0.2
#r "nuget: EnigmaCrypt.Net, 1.0.2"
#:package EnigmaCrypt.Net@1.0.2
#addin nuget:?package=EnigmaCrypt.Net&version=1.0.2
#tool nuget:?package=EnigmaCrypt.Net&version=1.0.2
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 | Versions 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. |
-
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.