Ejemplo n.º 1
0
        public static void LoadConsoleKeys(this Keyset keyset, string filename, IProgressReport logger = null)
        {
            foreach (KeyValue key in UniqueKeyDict.Values)
            {
                byte[] keyBytes = key.GetKey(keyset);
                Array.Clear(keyBytes, 0, keyBytes.Length);
            }

            ReadMainKeys(keyset, filename, UniqueKeyDict, logger);
            keyset.DeriveKeys();
        }
Ejemplo n.º 2
0
 public static void ReadKeyFile(Keyset keyset, string filename, string titleKeysFilename = null, string consoleKeysFilename = null, IProgressReport logger = null)
 {
     if (filename != null)
     {
         ReadMainKeys(keyset, filename, AllKeyDict, logger);
     }
     if (consoleKeysFilename != null)
     {
         ReadMainKeys(keyset, consoleKeysFilename, AllKeyDict, logger);
     }
     if (titleKeysFilename != null)
     {
         ReadTitleKeys(keyset, titleKeysFilename, logger);
     }
     keyset.DeriveKeys(logger);
 }
Ejemplo n.º 3
0
        public static void ReadKeyFile(Keyset keyset, string filename, string titleKeysFilename = null, string consoleKeysFilename = null, IProgressReport logger = null)
        {
            Dictionary <string, KeyValue> keyDictionary = CreateFullKeyDictionary();

            if (filename != null)
            {
                ReadMainKeys(keyset, filename, keyDictionary, logger);
            }
            if (consoleKeysFilename != null)
            {
                ReadMainKeys(keyset, consoleKeysFilename, keyDictionary, logger);
            }
            if (titleKeysFilename != null)
            {
                ReadTitleKeys(keyset, titleKeysFilename, logger);
            }

            keyset.ExternalKeySet.TrimExcess();
            keyset.DeriveKeys(logger);
        }
Ejemplo n.º 4
0
        public static Keyset ReadKeyFile(string filename, string titleKeysFilename = null, string consoleKeysFilename = null, IProgressReport logger = null)
        {
            var keyset = new Keyset();

            if (filename != null)
            {
                ReadMainKeys(keyset, filename, AllKeyDict, logger);
            }
            if (consoleKeysFilename != null)
            {
                ReadMainKeys(keyset, consoleKeysFilename, AllKeyDict, logger);
            }
            if (titleKeysFilename != null)
            {
                ReadTitleKeys(keyset, titleKeysFilename, logger);
            }
            keyset.DeriveKeys(logger);

            return(keyset);
        }