Skip to content

Commit af63fd6

Browse files
committed
feat: set validator class visibility to internal
1 parent 1b4509d commit af63fd6

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/Helpers/Validators.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using SafeCrypt.Models;
22
using System;
3-
using System.Collections.Generic;
4-
using System.Text;
53

64
namespace SafeCrypt.Helpers
75
{
8-
public static class Validators
6+
internal static class Validators
97
{
108
/// <summary>
119
/// Validates that the specified ByteEncryptionParameters instance is not null
@@ -15,7 +13,7 @@ public static class Validators
1513
/// <exception cref="ArgumentNullException">
1614
/// Thrown if the specified parameters instance is null or if any of its required properties are null.
1715
/// </exception>
18-
public static void ValidateNotNull(EncryptionParameters parameters)
16+
internal static void ValidateNotNull(EncryptionParameters parameters)
1917
{
2018
if (parameters == null)
2119
{
@@ -37,7 +35,7 @@ public static void ValidateNotNull(EncryptionParameters parameters)
3735
throw new ArgumentNullException(nameof(parameters.IV), "IV property cannot be null.");
3836
}
3937
}
40-
public static void ValidateNotNull(DecryptionParameters parameters)
38+
internal static void ValidateNotNull(DecryptionParameters parameters)
4139
{
4240
if (parameters == null)
4341
{
@@ -60,7 +58,7 @@ public static void ValidateNotNull(DecryptionParameters parameters)
6058
}
6159
}
6260

63-
public static void ValidateNotNull(StringEncryptionParameters parameters)
61+
internal static void ValidateNotNull(StringEncryptionParameters parameters)
6462
{
6563
if (parameters == null)
6664
{
@@ -88,7 +86,7 @@ public static void ValidateNotNull(StringEncryptionParameters parameters)
8886
/// </summary>
8987
/// <param name="keyAsString">The string to validate.</param>
9088
/// <returns>True if the string is a valid Base64-encoded key; otherwise, false.</returns>
91-
public static bool IsBase64String(string keyAsString)
89+
internal static bool IsBase64String(string keyAsString)
9290
{
9391
if (string.IsNullOrEmpty(keyAsString))
9492
{
@@ -111,7 +109,7 @@ public static bool IsBase64String(string keyAsString)
111109
/// </summary>
112110
/// <param name="dataLength">The length of the data to be encrypted.</param>
113111
/// <returns>True if the block size is valid; otherwise, false.</returns>
114-
public static bool IsValidBlockSize(int dataLength)
112+
internal static bool IsValidBlockSize(int dataLength)
115113
{
116114
// AES block size is 128 bits (16 bytes)
117115
return dataLength % 16 == 0;

0 commit comments

Comments
 (0)