30 lines
857 B
C#
30 lines
857 B
C#
using Manager.YouTube.Util;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace Manager.App.Components.Application.Dev;
|
|
|
|
public partial class AuthenticationHasher : ComponentBase
|
|
{
|
|
private const string DefaultOrigin = "https://www.youtube.com";
|
|
public string DatasyncId { get; set; } = "";
|
|
public string Time { get; set; } = "";
|
|
public string SecureCookie { get; set; } = "";
|
|
public string Origin { get; set; } = DefaultOrigin;
|
|
|
|
public string OutputHash { get; set; } = "";
|
|
|
|
private void Clear()
|
|
{
|
|
DatasyncId = "";
|
|
Time = "";
|
|
SecureCookie = "";
|
|
Origin = DefaultOrigin;
|
|
OutputHash = "";
|
|
}
|
|
|
|
private void Hash()
|
|
{
|
|
var hashedValue= AuthenticationUtilities.GetSapisidHash(DatasyncId, SecureCookie, Origin, Time);
|
|
OutputHash = hashedValue ?? "Hash failed!";
|
|
}
|
|
} |