File tree Expand file tree Collapse file tree
src/SafeCrypt.Lib/Helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,12 +42,18 @@ public static byte[] GenerateRandomIVKeyAsBytes(int length)
4242 /// <see cref="BitConverter.ToString"/>. Any hyphens in the resulting string are removed
4343 /// using <see cref="string.Replace"/>.
4444 /// </remarks>
45- public static string GenerateRandomIVKeyAsString ( )
45+ public static string GenerateHexadecimalIVKey ( )
4646 {
4747 byte [ ] randomBytes = GenerateRandomIVKeyAsBytes ( 16 ) ;
4848 return BitConverter . ToString ( randomBytes ) . Replace ( "-" , "" ) ;
4949 }
5050
51+ public static string GenerateBase64IVKey ( )
52+ {
53+ byte [ ] randomBytes = GenerateRandomIVKeyAsBytes ( 16 ) ;
54+ return Convert . ToBase64String ( randomBytes ) ;
55+ }
56+
5157 /// <summary>
5258 /// Generates a valid AES secret key with the specified key size.
5359 /// </summary>
You can’t perform that action at this time.
0 commit comments