We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a56bc5 commit 7ecf082Copy full SHA for 7ecf082
2 files changed
Encrypt/AesEncryption/Encrypt.cs
@@ -8,7 +8,17 @@ public class Encrypt : BaseAesEncryption
8
{
9
public byte[] AesEncrypt(byte[] data, byte[] secretKey, byte[] iv)
10
=> EncryptAES(data, secretKey, iv);
11
-
+
12
+ public byte[] AesEncrypt(string data, string secretKey, string iv)
13
+ {
14
+ NullChecks(data, secretKey, iv);
15
16
+ var aesKey = Encoding.UTF8.GetBytes(secretKey);
17
+ var aesIv = Encoding.UTF8.GetBytes(iv);
18
+ var aesData = data.HexadecimalStringToByteArray();
19
20
+ return EncryptAES(aesData, aesKey, aesIv);
21
+ }
22
23
public string AesEncryptByteToHexString(byte[] data, byte[] secretKey, byte[] iv)
24
Encrypt/Encrypt.cs
0 commit comments