Skip to content

Commit 7f41ac1

Browse files
committed
feat: add method generate random iv key as string
1 parent af63fd6 commit 7f41ac1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Helpers/KeyGenerators.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public static byte[] GenerateRandomIVKeyAsBytes(int length)
3030
return randomBytes;
3131
}
3232

33+
public static string GenerateRandomIVKeyAsString()
34+
{
35+
byte[] randomBytes = GenerateRandomIVKeyAsBytes(16);
36+
return BitConverter.ToString(randomBytes).Replace("-", "");
37+
}
38+
3339
/// <summary>
3440
/// Generates a valid AES secret key with the specified key size.
3541
/// </summary>

0 commit comments

Comments
 (0)