summaryrefslogtreecommitdiff
path: root/Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs')
-rw-r--r--Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs64
1 files changed, 64 insertions, 0 deletions
diff --git a/Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs b/Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs
new file mode 100644
index 0000000..6da8710
--- /dev/null
+++ b/Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace Steamworks;
+
+public static class SteamEncryptedAppTicket
+{
+ public static bool BDecryptTicket(byte[] rgubTicketEncrypted, uint cubTicketEncrypted, byte[] rgubTicketDecrypted, ref uint pcubTicketDecrypted, byte[] rgubKey, int cubKey)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ return NativeMethods.SteamEncryptedAppTicket_BDecryptTicket(rgubTicketEncrypted, cubTicketEncrypted, rgubTicketDecrypted, ref pcubTicketDecrypted, rgubKey, cubKey);
+ }
+
+ public static bool BIsTicketForApp(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ return NativeMethods.SteamEncryptedAppTicket_BIsTicketForApp(rgubTicketDecrypted, cubTicketDecrypted, nAppID);
+ }
+
+ public static uint GetTicketIssueTime(byte[] rgubTicketDecrypted, uint cubTicketDecrypted)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ return NativeMethods.SteamEncryptedAppTicket_GetTicketIssueTime(rgubTicketDecrypted, cubTicketDecrypted);
+ }
+
+ public static void GetTicketSteamID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out CSteamID psteamID)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ NativeMethods.SteamEncryptedAppTicket_GetTicketSteamID(rgubTicketDecrypted, cubTicketDecrypted, out psteamID);
+ }
+
+ public static uint GetTicketAppID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ return NativeMethods.SteamEncryptedAppTicket_GetTicketAppID(rgubTicketDecrypted, cubTicketDecrypted);
+ }
+
+ public static bool BUserOwnsAppInTicket(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ return NativeMethods.SteamEncryptedAppTicket_BUserOwnsAppInTicket(rgubTicketDecrypted, cubTicketDecrypted, nAppID);
+ }
+
+ public static bool BUserIsVacBanned(byte[] rgubTicketDecrypted, uint cubTicketDecrypted)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ return NativeMethods.SteamEncryptedAppTicket_BUserIsVacBanned(rgubTicketDecrypted, cubTicketDecrypted);
+ }
+
+ public static byte[] GetUserVariableData(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out uint pcubUserData)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ IntPtr source = NativeMethods.SteamEncryptedAppTicket_GetUserVariableData(rgubTicketDecrypted, cubTicketDecrypted, out pcubUserData);
+ byte[] array = new byte[pcubUserData];
+ Marshal.Copy(source, array, 0, (int)pcubUserData);
+ return array;
+ }
+
+ public static bool BIsTicketSigned(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, byte[] pubRSAKey, uint cubRSAKey)
+ {
+ InteropHelp.TestIfPlatformSupported();
+ return NativeMethods.SteamEncryptedAppTicket_BIsTicketSigned(rgubTicketDecrypted, cubTicketDecrypted, pubRSAKey, cubRSAKey);
+ }
+}