@@ -5,12 +5,12 @@ A C# library for encryption and decryption.
55## Overview
66
77The SafeCrypt library provides a set of methods for encrypting and decrypting data using various encryption algorithms,
8- including the Advanced Encryption Standard (AES) and RSA (Rivest–Shamir–Adleman).
8+ including the Advanced Encryption Standard (AES) and RSA (Rivest–Shamir–Adleman).
99It is designed to be easy to use and can be integrated into C# applications that require secure data transmission or storage.
1010## Table of Contents
1111
1212- [ Installation] ( #installation )
13- - [ AES Encryption and Decryption usage] ( #usage )
13+ - [ AES Encryption and Decryption usage] ( #aes )
1414- [ RSA Encryption and Decryption usage] ( #rsa )
1515- [ Contributing] ( #contributing )
1616- [ License] ( #license )
@@ -34,10 +34,9 @@ To use the SafeCrypt library in your C# project, follow these steps:
3434
3535Now, you can reference the SafeCrypt library in your C# project.
3636
37- ## Usage
38-
39- To use the AES encryption in your C# application,
40- instantiate the ` AesEncryption ` or ` AesDecryption ` class and call the provided methods. Here's a simple example:
37+ ## Aes
38+ To use AES encryption in your C# application, access the static Aes class directly.
39+ Call the provided methods; Here's a simple example:
4140
4241``` csharp
4342using SafeCrypt .AES ;
@@ -61,7 +60,7 @@ class Program
6160
6261 };
6362
64- var data = await Aes .DecryptFromBase64StringAsync (parameterToDecrypt )
63+ var data = await Aes .DecryptFromBase64StringAsync (parameterToDecrypt );
6564
6665 Console .WriteLine ($" Decrypted Data: {data .DecryptedData }" );
6766 Console .WriteLine ($" Initialization Vector: {data .Iv }" );
@@ -97,16 +96,13 @@ class Program
9796 Console .WriteLine (response .Iv );
9897 Console .WriteLine (response .SecretKey );
9998
100-
101-
10299 var decryptorParam = new DecryptionParameters
103100 {
104101 IV = response .Iv ,
105102 SecretKey = secret ,
106103 DataToDecrypt = response .EncryptedData
107104 };
108105
109-
110106 var decryptionData = await Aes .DecryptFromBase64StringAsync (decryptorParam );
111107
112108 Console .WriteLine (decryptionData .DecryptedData );
0 commit comments