Squashed commit of ASF 2FA

Check https://github.com/JustArchi/ArchiSteamFarm/wiki/Escrow for more info
This commit is contained in:
JustArchi
2015-12-11 22:53:28 +01:00
parent 9a2a37f2fc
commit b3162ce390
23 changed files with 1441 additions and 29 deletions

24
SteamAuth/Util.cs Normal file
View File

@@ -0,0 +1,24 @@
using System;
using System.Net;
namespace SteamAuth
{
public class Util
{
public static long GetSystemUnixTime()
{
return (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
}
public static byte[] HexStringToByteArray(string hex)
{
int hexLen = hex.Length;
byte[] ret = new byte[hexLen / 2];
for (int i = 0; i < hexLen; i += 2)
{
ret[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16);
}
return ret;
}
}
}