Skip to content

Commit 758507d

Browse files
committed
feat: convert base aes encryption logic to run async
1 parent d7c8f80 commit 758507d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/SafeCrypt.Lib/Encryption/AesEncryption/BaseAesEncryption.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System;
33
using System.IO;
44
using System.Security.Cryptography;
5+
using System.Threading.Tasks;
56

67
namespace SafeCrypt.AesEncryption
78
{
@@ -23,7 +24,7 @@ public class BaseAesEncryption
2324
/// <exception cref="Exception">
2425
/// Thrown for general encryption-related exceptions.
2526
/// </exception>
26-
internal static byte[] EncryptAES(ByteEncryptionParameters param, CipherMode mode = CipherMode.CBC)
27+
internal static async Task<byte[]> EncryptAsync(ByteEncryptionParameters param, CipherMode mode = CipherMode.CBC)
2728
{
2829
try
2930
{
@@ -72,7 +73,7 @@ internal static byte[] EncryptAES(ByteEncryptionParameters param, CipherMode mod
7273
/// <exception cref="ArgumentNullException">
7374
/// Thrown if the input encrypted data, key, or initialization vector is null.
7475
/// </exception>
75-
internal static byte[] DecryptAES(ByteDecryptionParameters param, CipherMode mode = CipherMode.CBC)
76+
internal static async Task<byte[]> DecryptAsync(ByteDecryptionParameters param, CipherMode mode = CipherMode.CBC)
7677
{
7778
try
7879
{

0 commit comments

Comments
 (0)