File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,18 @@ public static byte[] GenerateRandomIVKeyAsBytes(int length)
3030 return randomBytes ;
3131 }
3232
33+ /// <summary>
34+ /// Generates a random initialization vector (IV) key as a hexadecimal string.
35+ /// </summary>
36+ /// <returns>
37+ /// A hexadecimal string representation of the randomly generated IV key.
38+ /// </returns>
39+ /// <remarks>
40+ /// This method internally uses the <see cref="GenerateRandomIVKeyAsBytes"/> method
41+ /// to obtain a random byte array and then converts it to a hexadecimal string using
42+ /// <see cref="BitConverter.ToString"/>. Any hyphens in the resulting string are removed
43+ /// using <see cref="string.Replace"/>.
44+ /// </remarks>
3345 public static string GenerateRandomIVKeyAsString ( )
3446 {
3547 byte [ ] randomBytes = GenerateRandomIVKeyAsBytes ( 16 ) ;
You can’t perform that action at this time.
0 commit comments