- refactored to use temp directory helper class - consolidated test key generation to helper class
13 lines
303 B
C#
13 lines
303 B
C#
using System.Security.Cryptography;
|
|
|
|
namespace StevanFreeborn.Extensions.Configuration.Secure.Tests.Common;
|
|
|
|
internal static class KeyGenerator
|
|
{
|
|
public static string GetValidBase64Key()
|
|
{
|
|
var key = new byte[32];
|
|
RandomNumberGenerator.Fill(key);
|
|
return Convert.ToBase64String(key);
|
|
}
|
|
} |