Skip to content

Commit

Permalink
improve namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
wuriyanto48 committed Jan 21, 2023
1 parent 96510ea commit ca319aa
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion NetCrypsi.Lib/Src/Aesx/AesCbc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Security.Cryptography;
using System.Text;

namespace NetCrypsi.Lib.Aesx
namespace NetCrypsi.Lib
{
internal sealed class AesCbc
{
Expand Down
2 changes: 1 addition & 1 deletion NetCrypsi.Lib/Src/Aesx/AesGcm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO;
using System.Text;

namespace NetCrypsi.Lib.Aesx
namespace NetCrypsi.Lib
{
internal sealed class AesGcm
{
Expand Down
2 changes: 1 addition & 1 deletion NetCrypsi.Lib/Src/Aesx/AesKey.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace NetCrypsi.Lib.Aesx
namespace NetCrypsi.Lib
{
internal enum AesKey
{
Expand Down
50 changes: 25 additions & 25 deletions NetCrypsi.Lib/Src/Aesx/Aesx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Security.Cryptography;
using System.Text;

namespace NetCrypsi.Lib.Aesx
namespace NetCrypsi.Lib
{
public sealed class Aesx
{
Expand All @@ -16,67 +16,67 @@ private Aesx()
}

// CBC
public static byte[] EncryptWithAES128CBC(byte[] plaindata, byte[] key) => Lib.Aesx.AesCbc.EncryptWithAES128CBC(plaindata, key);
public static byte[] EncryptWithAES128CBC(byte[] plaindata, byte[] key) => Lib.AesCbc.EncryptWithAES128CBC(plaindata, key);

public static byte[] EncryptWithAES192CBC(byte[] plaindata, byte[] key) => Lib.Aesx.AesCbc.EncryptWithAES192CBC(plaindata, key);
public static byte[] EncryptWithAES192CBC(byte[] plaindata, byte[] key) => Lib.AesCbc.EncryptWithAES192CBC(plaindata, key);

public static byte[] EncryptWithAES256CBC(byte[] plaindata, byte[] key) => Lib.Aesx.AesCbc.EncryptWithAES256CBC(plaindata, key);
public static byte[] EncryptWithAES256CBC(byte[] plaindata, byte[] key) => Lib.AesCbc.EncryptWithAES256CBC(plaindata, key);

public static byte[] DecryptWithAES128CBC(byte[] encryptedData, byte[] key) => Lib.Aesx.AesCbc.DecryptWithAES128CBC(encryptedData, key);
public static byte[] DecryptWithAES128CBC(byte[] encryptedData, byte[] key) => Lib.AesCbc.DecryptWithAES128CBC(encryptedData, key);

public static byte[] DecryptWithAES192CBC(byte[] encryptedData, byte[] key) => Lib.Aesx.AesCbc.DecryptWithAES192CBC(encryptedData, key);
public static byte[] DecryptWithAES192CBC(byte[] encryptedData, byte[] key) => Lib.AesCbc.DecryptWithAES192CBC(encryptedData, key);

public static byte[] DecryptWithAES256CBC(byte[] encryptedData, byte[] key) => Lib.Aesx.AesCbc.DecryptWithAES256CBC(encryptedData, key);
public static byte[] DecryptWithAES256CBC(byte[] encryptedData, byte[] key) => Lib.AesCbc.DecryptWithAES256CBC(encryptedData, key);

// io
public static void EncryptWithAES128CBC(Stream plaindata, Stream outEncryptedData, byte[] key) =>
Lib.Aesx.AesCbc.EncryptWithAES128CBC(plaindata, outEncryptedData, key);
Lib.AesCbc.EncryptWithAES128CBC(plaindata, outEncryptedData, key);

public static void EncryptWithAES192CBC(Stream plaindata, Stream outEncryptedData, byte[] key) =>
Lib.Aesx.AesCbc.EncryptWithAES192CBC(plaindata, outEncryptedData, key);
Lib.AesCbc.EncryptWithAES192CBC(plaindata, outEncryptedData, key);

public static void EncryptWithAES256CBC(Stream plaindata, Stream outEncryptedData, byte[] key) =>
Lib.Aesx.AesCbc.EncryptWithAES256CBC(plaindata, outEncryptedData, key);
Lib.AesCbc.EncryptWithAES256CBC(plaindata, outEncryptedData, key);

public static void DecryptWithAES128CBC(Stream encryptedData, Stream outPlainData, byte[] key) =>
Lib.Aesx.AesCbc.DecryptWithAES128CBC(encryptedData, outPlainData, key);
Lib.AesCbc.DecryptWithAES128CBC(encryptedData, outPlainData, key);

public static void DecryptWithAES192CBC(Stream encryptedData, Stream outPlainData, byte[] key) =>
Lib.Aesx.AesCbc.DecryptWithAES192CBC(encryptedData, outPlainData, key);
Lib.AesCbc.DecryptWithAES192CBC(encryptedData, outPlainData, key);

public static void DecryptWithAES256CBC(Stream encryptedData, Stream outPlainData, byte[] key) =>
Lib.Aesx.AesCbc.DecryptWithAES256CBC(encryptedData, outPlainData, key);
Lib.AesCbc.DecryptWithAES256CBC(encryptedData, outPlainData, key);

// GCM
public static byte[] EncryptWithAES128GCM(byte[] plaindata, byte[] key) => Lib.Aesx.AesGcm.EncryptWithAES128GCM(plaindata, key);
public static byte[] EncryptWithAES128GCM(byte[] plaindata, byte[] key) => Lib.AesGcm.EncryptWithAES128GCM(plaindata, key);

public static byte[] EncryptWithAES192GCM(byte[] plaindata, byte[] key) => Lib.Aesx.AesGcm.EncryptWithAES192GCM(plaindata, key);
public static byte[] EncryptWithAES192GCM(byte[] plaindata, byte[] key) => Lib.AesGcm.EncryptWithAES192GCM(plaindata, key);

public static byte[] EncryptWithAES256GCM(byte[] plaindata, byte[] key) => Lib.Aesx.AesGcm.EncryptWithAES256GCM(plaindata, key);
public static byte[] EncryptWithAES256GCM(byte[] plaindata, byte[] key) => Lib.AesGcm.EncryptWithAES256GCM(plaindata, key);

public static byte[] DecryptWithAES128GCM(byte[] encryptedData, byte[] key) => Lib.Aesx.AesGcm.DecryptWithAES128GCM(encryptedData, key);
public static byte[] DecryptWithAES128GCM(byte[] encryptedData, byte[] key) => Lib.AesGcm.DecryptWithAES128GCM(encryptedData, key);

public static byte[] DecryptWithAES192GCM(byte[] encryptedData, byte[] key) => Lib.Aesx.AesGcm.DecryptWithAES192GCM(encryptedData, key);
public static byte[] DecryptWithAES192GCM(byte[] encryptedData, byte[] key) => Lib.AesGcm.DecryptWithAES192GCM(encryptedData, key);

public static byte[] DecryptWithAES256GCM(byte[] encryptedData, byte[] key) => Lib.Aesx.AesGcm.DecryptWithAES256GCM(encryptedData, key);
public static byte[] DecryptWithAES256GCM(byte[] encryptedData, byte[] key) => Lib.AesGcm.DecryptWithAES256GCM(encryptedData, key);

// io
public static void EncryptWithAES128GCM(Stream plaindata, Stream outEncryptedData, byte[] key) =>
Lib.Aesx.AesGcm.EncryptWithAES128GCM(plaindata, outEncryptedData, key);
Lib.AesGcm.EncryptWithAES128GCM(plaindata, outEncryptedData, key);

public static void EncryptWithAES192GCM(Stream plaindata, Stream outEncryptedData, byte[] key) =>
Lib.Aesx.AesGcm.EncryptWithAES192GCM(plaindata, outEncryptedData, key);
Lib.AesGcm.EncryptWithAES192GCM(plaindata, outEncryptedData, key);

public static void EncryptWithAES256GCM(Stream plaindata, Stream outEncryptedData, byte[] key) =>
Lib.Aesx.AesGcm.EncryptWithAES256GCM(plaindata, outEncryptedData, key);
Lib.AesGcm.EncryptWithAES256GCM(plaindata, outEncryptedData, key);

public static void DecryptWithAES128GCM(Stream encryptedData, Stream outPlainData, byte[] key) =>
Lib.Aesx.AesGcm.DecryptWithAES128GCM(encryptedData, outPlainData, key);
Lib.AesGcm.DecryptWithAES128GCM(encryptedData, outPlainData, key);

public static void DecryptWithAES192GCM(Stream encryptedData, Stream outPlainData, byte[] key) =>
Lib.Aesx.AesGcm.DecryptWithAES192GCM(encryptedData, outPlainData, key);
Lib.AesGcm.DecryptWithAES192GCM(encryptedData, outPlainData, key);

public static void DecryptWithAES256GCM(Stream encryptedData, Stream outPlainData, byte[] key) =>
Lib.Aesx.AesGcm.DecryptWithAES256GCM(encryptedData, outPlainData, key);
Lib.AesGcm.DecryptWithAES256GCM(encryptedData, outPlainData, key);
}
}
2 changes: 1 addition & 1 deletion NetCrypsi.Lib/Src/Aesx/Validator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace NetCrypsi.Lib.Aesx
namespace NetCrypsi.Lib
{
internal sealed class Validator
{
Expand Down
2 changes: 1 addition & 1 deletion NetCrypsi.Lib/Src/Digestx/Digestx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO;
using System.Text;

namespace NetCrypsi.Lib.Digestx
namespace NetCrypsi.Lib
{
public sealed class Digestx
{
Expand Down
2 changes: 1 addition & 1 deletion NetCrypsi.Lib/Src/Hmacx/Hmacx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Security.Cryptography;
using System.Text;

namespace NetCrypsi.Lib.Hmacx
namespace NetCrypsi.Lib
{
public sealed class Hmacx
{
Expand Down
6 changes: 3 additions & 3 deletions NetCrypsi.Lib/Src/Rsax/DigitalSignature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System.Text;
using System.Linq;

namespace NetCrypsi.Lib.Rsax
namespace NetCrypsi.Lib
{
public sealed class DigitalSignature
public sealed class RSADigitalSignature
{
private DigitalSignature()
private RSADigitalSignature()
{

}
Expand Down
6 changes: 3 additions & 3 deletions NetCrypsi.Lib/Src/Rsax/Encryption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System.Text;
using System.Linq;

namespace NetCrypsi.Lib.Rsax
namespace NetCrypsi.Lib
{
public sealed class Encryption
public sealed class RSAEncryption
{
private Encryption()
private RSAEncryption()
{

}
Expand Down
2 changes: 1 addition & 1 deletion NetCrypsi.Lib/Src/Rsax/Rsax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Linq;

namespace NetCrypsi.Lib.Rsax
namespace NetCrypsi.Lib
{
public sealed class Rsax
{
Expand Down

0 comments on commit ca319aa

Please sign in to comment.