Skip to content

Commit

Permalink
Make CompareHelpers shared
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed Apr 4, 2024
1 parent 44cb1b4 commit 0fdfcd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Aspire.Dashboard/Aspire.Dashboard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
<Link>Protos\resource_service.proto</Link>
</Protobuf>
<Compile Include="$(SharedDir)ChannelExtensions.cs" Link="Extensions\ChannelExtensions.cs" />
<Compile Include="$(SharedDir)CompareHelpers.cs" Link="Utils\CompareHelpers.cs" />
<Compile Include="$(SharedDir)IConfigurationExtensions.cs" Link="Utils\IConfigurationExtensions.cs" />
<Compile Include="$(SharedDir)KnownResourceNames.cs" Link="Utils\KnownResourceNames.cs" />
<Compile Include="$(SharedDir)KnownFormats.cs" Link="Utils\KnownFormats.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System.Text.Encodings.Web;
using Aspire.Dashboard.Configuration;
using Aspire.Dashboard.Utils;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Options;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
using System.Security.Cryptography;
using System.Text;

namespace Aspire.Dashboard.Utils;
namespace Aspire;

internal static class CompareHelpers
{
// This method is used to compare two keys in a way that avoids timing attacks.
public static bool CompareKey(byte[] expectedKeyBytes, string requestKey)
internal static bool CompareKey(byte[] expectedKeyBytes, string requestKey)
{
const int StackAllocThreshold = 256;

Expand Down

0 comments on commit 0fdfcd5

Please sign in to comment.