DynaCipher 1.0.0
dotnet add package DynaCipher --version 1.0.0
NuGet\Install-Package DynaCipher -Version 1.0.0
<PackageReference Include="DynaCipher" Version="1.0.0" />
<PackageVersion Include="DynaCipher" Version="1.0.0" />
<PackageReference Include="DynaCipher" />
paket add DynaCipher --version 1.0.0
#r "nuget: DynaCipher, 1.0.0"
#:package DynaCipher@1.0.0
#addin nuget:?package=DynaCipher&version=1.0.0
#tool nuget:?package=DynaCipher&version=1.0.0
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>
The iv.
Implements Decipher(byte[], byte[], byte[])
Returns
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
<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
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>
The enc.
Implements EncipherAsString(string, string, bool, Encoding)
Returns
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>
The iv.
Returns
<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
<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
<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>
The enc.
Returns
Product | Versions 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. |
-
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 |