Skip to content

Commit 1ce1e06

Browse files
committed
Add encrypted method that converts and returns byte to string
1 parent 655f410 commit 1ce1e06

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Encrypt/AesEncryption/Encrypt.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ public string AesEncryptByteToBase64String(byte[] data, byte[] secretKey, byte[]
3434
return Convert.ToBase64String(cipherText);
3535
}
3636

37-
37+
public string AesEncryptByteToString(byte[] data, byte[] secretKey, byte[] iv)
38+
{
39+
var cipherText = EncryptAES(data, secretKey, iv);
40+
41+
return cipherText.BytesToString();
42+
}
3843

3944
private void NullChecks(string data, string secretKey, string iv)
4045
{

0 commit comments

Comments
 (0)