Skip to content

Commit bfd88a1

Browse files
committed
Add CovertKeys method
1 parent 469aaaf commit bfd88a1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Encrypt/AesEncryption/AesEncryption.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ private void NullChecks(string data, string secretKey, string iv)
8181
throw new ArgumentNullException(nameof(iv));
8282
}
8383

84+
private (byte[], byte[]) ConvertKeysToBytes(string secretKey, string ivKey)
85+
{
86+
var secret = Encoding.UTF8.GetBytes(secretKey);
87+
var iv = Encoding.UTF8.GetBytes(ivKey);
88+
89+
return (secret, iv);
90+
}
8491
private void NullChecks(string data, string secretKey)
8592
{
8693
if (data == null || data.Length <= 0)

0 commit comments

Comments
 (0)