mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Avatar image upload signature
This commit is contained in:
17
AppApi.cs
17
AppApi.cs
@@ -16,6 +16,7 @@ using System.Security.Cryptography;
|
||||
using System.Net;
|
||||
using Windows.UI.Notifications;
|
||||
using Windows.Data.Xml.Dom;
|
||||
using librsync.net;
|
||||
|
||||
namespace VRCX
|
||||
{
|
||||
@@ -35,6 +36,22 @@ namespace VRCX
|
||||
return System.Convert.ToBase64String(md5);
|
||||
}
|
||||
|
||||
public string SignFile(string Blob)
|
||||
{
|
||||
byte[] fileData = Convert.FromBase64CharArray(Blob.ToCharArray(), 0, Blob.Length);
|
||||
Stream sig = Librsync.ComputeSignature(new MemoryStream(fileData));
|
||||
var memoryStream = new MemoryStream();
|
||||
sig.CopyTo(memoryStream);
|
||||
byte[] sigBytes = memoryStream.ToArray();
|
||||
return System.Convert.ToBase64String(sigBytes);
|
||||
}
|
||||
|
||||
public string FileLength(string Blob)
|
||||
{
|
||||
byte[] fileData = Convert.FromBase64CharArray(Blob.ToCharArray(), 0, Blob.Length);
|
||||
return fileData.Length.ToString();
|
||||
}
|
||||
|
||||
public void ShowDevTools()
|
||||
{
|
||||
MainForm.Instance.Browser.ShowDevTools();
|
||||
|
||||
Reference in New Issue
Block a user