added namespace SteamGuard

This commit is contained in:
Carson McManus 2016-08-27 18:42:43 -04:00
parent 8c154ceef3
commit 1ff3980c98
2 changed files with 1095 additions and 1090 deletions

View file

@ -8,8 +8,10 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Security.Cryptography; using System.Security.Cryptography;
public class Manifest namespace SteamGuard
{ {
public class Manifest
{
private const int PBKDF2_ITERATIONS = 50000; //Set to 50k to make program not unbearably slow. May increase in future. private const int PBKDF2_ITERATIONS = 50000; //Set to 50k to make program not unbearably slow. May increase in future.
private const int SALT_LENGTH = 8; private const int SALT_LENGTH = 8;
private const int KEY_SIZE_BYTES = 32; private const int KEY_SIZE_BYTES = 32;
@ -517,7 +519,6 @@ public class Manifest
return Convert.ToBase64String(IV); return Convert.ToBase64String(IV);
} }
/// <summary> /// <summary>
/// Generates an encryption key derived using a password, a random salt, and specified number of rounds of PBKDF2 /// Generates an encryption key derived using a password, a random salt, and specified number of rounds of PBKDF2
/// </summary> /// </summary>
@ -539,4 +540,5 @@ public class Manifest
return pbkdf2.GetBytes(KEY_SIZE_BYTES); return pbkdf2.GetBytes(KEY_SIZE_BYTES);
} }
} }
}
} }

View file

@ -9,8 +9,10 @@ using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
public static class Program namespace SteamGuard
{ {
public static class Program
{
public const string defaultSteamGuardPath = "~/maFiles"; public const string defaultSteamGuardPath = "~/maFiles";
public static string SteamGuardPath { get; set; } = defaultSteamGuardPath; public static string SteamGuardPath { get; set; } = defaultSteamGuardPath;
@ -637,4 +639,5 @@ public static class Program
} }
} }
} }
}
} }