DynaCipher 1.0.0

dotnet add package DynaCipher --version 1.0.0
                    
NuGet\Install-Package DynaCipher -Version 1.0.0
                    
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="DynaCipher" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DynaCipher" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DynaCipher" />
                    
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 DynaCipher --version 1.0.0
                    
#r "nuget: DynaCipher, 1.0.0"
                    
#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 DynaCipher@1.0.0
                    
#: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=DynaCipher&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DynaCipher&version=1.0.0
                    
Install as a Cake Tool
DynaCipher

DynaCipher Assembly

Namespaces

<a name='DynaCipher'></a>

DynaCipher Namespace

Classes

<a name='DynaCipher.AesCipher'></a>

AesCipher Class

Implementation of ICipher with AES Algorithm.

public class AesCipher :
DynaCipher.ICipher

Inheritance System.Object 🡒 AesCipher

Implements ICipher

Example

var original = "UserName: test#e21;Password: test123#!";  
            var seed = AesCipher.NewSeed;  
            var crypted = AesCipher.Encipher(original, seed, true);  
            var decrypted = AesCipher.Decipher(crypted, seed, true);  
            Assert.AreEqual(original, decrypted);  

See Also

Properties

<a name='DynaCipher.AesCipher.NewSeed'></a>

AesCipher.NewSeed Property

Creates new seed for generating guessed key.

public static string NewSeed { get; }

Implements NewSeed

Property Value

System.String
The new seed.

Methods

<a name='DynaCipher.AesCipher.AllowedChars()'></a>

AesCipher.AllowedChars() Method

private static System.Text.RegularExpressions.Regex AllowedChars();
Returns

System.Text.RegularExpressions.Regex

Remarks

Pattern:<br/>

[\\w\\s\\@\\&\\;\\:\\-\\.\\!\\#\\%\\^\\*\\(\\)\\{\\}\\[\\]\\\\/]+$  
```<br/>  
Options:<br/>  
  
```csharp  
RegexOptions.IgnoreCase  
```<br/>  
Explanation:<br/>  
  
```csharp  
○ Match a character in the set [!#%&(-*--/:;@[-^{}\w\s] greedily at least once.<br/>  
○ Match if at the end of the string or if before an ending newline.<br/>  

<a name='DynaCipher.AesCipher.Decipher(byte[],byte[],byte[])'></a>

AesCipher.Decipher(byte[], byte[], byte[]) Method

Deciphers the specified crypted data.

public static string Decipher(byte[] cryptedData, byte[] Key, byte[] IV);
Parameters

<a name='DynaCipher.AesCipher.Decipher(byte[],byte[],byte[]).cryptedData'></a>

cryptedData System.Byte[]

The crypted data.

<a name='DynaCipher.AesCipher.Decipher(byte[],byte[],byte[]).Key'></a>

Key System.Byte[]

The key.

<a name='DynaCipher.AesCipher.Decipher(byte[],byte[],byte[]).IV'></a>

IV System.Byte[]

The iv.

Implements Decipher(byte[], byte[], byte[])

Returns

System.String

Exceptions

System.ArgumentNullException
cryptedData
or
Key
or
IV

<a name='DynaCipher.AesCipher.Decipher(byte[],string,bool)'></a>

AesCipher.Decipher(byte[], string, bool) Method

Deciphers the specified crypted data.

public static string Decipher(byte[] cryptedData, string seed, bool withGuess=false);
Parameters

<a name='DynaCipher.AesCipher.Decipher(byte[],string,bool).cryptedData'></a>

cryptedData System.Byte[]

The crypted data.

<a name='DynaCipher.AesCipher.Decipher(byte[],string,bool).seed'></a>

seed System.String

The seed.

<a name='DynaCipher.AesCipher.Decipher(byte[],string,bool).withGuess'></a>

withGuess System.Boolean

if set to true [with guess].

Implements Decipher(byte[], string, bool)

Returns

System.String

<a name='DynaCipher.AesCipher.Encipher(string,string,bool)'></a>

AesCipher.Encipher(string, string, bool) Method

Enciphers the specified original.

public static byte[] Encipher(string original, string? seed=null, bool withGuess=false);
Parameters

<a name='DynaCipher.AesCipher.Encipher(string,string,bool).original'></a>

original System.String

The original.

<a name='DynaCipher.AesCipher.Encipher(string,string,bool).seed'></a>

seed System.String

The seed.

<a name='DynaCipher.AesCipher.Encipher(string,string,bool).withGuess'></a>

withGuess System.Boolean

if set to true [with guess].

Implements Encipher(string, string, bool)

Returns

System.Byte[]

Exceptions

System.ArgumentNullException
original

<a name='DynaCipher.AesCipher.EncipherAsString(string,string,bool,System.Text.Encoding)'></a>

AesCipher.EncipherAsString(string, string, bool, Encoding) Method

Enciphers as string.

public static string EncipherAsString(string original, string? seed=null, bool withGuess=false, System.Text.Encoding? enc=null);
Parameters

<a name='DynaCipher.AesCipher.EncipherAsString(string,string,bool,System.Text.Encoding).original'></a>

original System.String

The original.

<a name='DynaCipher.AesCipher.EncipherAsString(string,string,bool,System.Text.Encoding).seed'></a>

seed System.String

The seed.

<a name='DynaCipher.AesCipher.EncipherAsString(string,string,bool,System.Text.Encoding).withGuess'></a>

withGuess System.Boolean

if set to true [with guess].

<a name='DynaCipher.AesCipher.EncipherAsString(string,string,bool,System.Text.Encoding).enc'></a>

enc System.Text.Encoding

The enc.

Implements EncipherAsString(string, string, bool, Encoding)

Returns

System.String

Interfaces

<a name='DynaCipher.ICipher'></a>

ICipher Interface

Interface for cipher classes.

public interface ICipher

Derived
AesCipher

See Also

Properties

<a name='DynaCipher.ICipher.NewSeed'></a>

ICipher.NewSeed Property

Creates new seed for generating guessed key.

abstract static string NewSeed { get; }
Property Value

System.String
The new seed.

Methods

<a name='DynaCipher.ICipher.Decipher(byte[],byte[],byte[])'></a>

ICipher.Decipher(byte[], byte[], byte[]) Method

Deciphers the specified crypted data.

abstract static string Decipher(byte[] cryptedData, byte[] Key, byte[] IV);
Parameters

<a name='DynaCipher.ICipher.Decipher(byte[],byte[],byte[]).cryptedData'></a>

cryptedData System.Byte[]

The crypted data.

<a name='DynaCipher.ICipher.Decipher(byte[],byte[],byte[]).Key'></a>

Key System.Byte[]

The key.

<a name='DynaCipher.ICipher.Decipher(byte[],byte[],byte[]).IV'></a>

IV System.Byte[]

The iv.

Returns

System.String

<a name='DynaCipher.ICipher.Decipher(byte[],string,bool)'></a>

ICipher.Decipher(byte[], string, bool) Method

Deciphers the specified crypted data.

abstract static string Decipher(byte[] cryptedData, string seed, bool withGuess=false);
Parameters

<a name='DynaCipher.ICipher.Decipher(byte[],string,bool).cryptedData'></a>

cryptedData System.Byte[]

The crypted data.

<a name='DynaCipher.ICipher.Decipher(byte[],string,bool).seed'></a>

seed System.String

The seed.

<a name='DynaCipher.ICipher.Decipher(byte[],string,bool).withGuess'></a>

withGuess System.Boolean

if set to true [with guess].

Returns

System.String

<a name='DynaCipher.ICipher.Encipher(string,string,bool)'></a>

ICipher.Encipher(string, string, bool) Method

Enciphers the specified original.

abstract static byte[] Encipher(string original, string? seed=null, bool withGuess=false);
Parameters

<a name='DynaCipher.ICipher.Encipher(string,string,bool).original'></a>

original System.String

The original.

<a name='DynaCipher.ICipher.Encipher(string,string,bool).seed'></a>

seed System.String

The seed.

<a name='DynaCipher.ICipher.Encipher(string,string,bool).withGuess'></a>

withGuess System.Boolean

if set to true [with guess].

Returns

System.Byte[]

<a name='DynaCipher.ICipher.EncipherAsString(string,string,bool,System.Text.Encoding)'></a>

ICipher.EncipherAsString(string, string, bool, Encoding) Method

Enciphers as string.

abstract static string EncipherAsString(string original, string? seed=null, bool withGuess=false, System.Text.Encoding? enc=null);
Parameters

<a name='DynaCipher.ICipher.EncipherAsString(string,string,bool,System.Text.Encoding).original'></a>

original System.String

The original.

<a name='DynaCipher.ICipher.EncipherAsString(string,string,bool,System.Text.Encoding).seed'></a>

seed System.String

The seed.

<a name='DynaCipher.ICipher.EncipherAsString(string,string,bool,System.Text.Encoding).withGuess'></a>

withGuess System.Boolean

if set to true [with guess].

<a name='DynaCipher.ICipher.EncipherAsString(string,string,bool,System.Text.Encoding).enc'></a>

enc System.Text.Encoding

The enc.

Returns

System.String

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.
  • net9.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.0 177 4/21/2025