예제 #1
0
 public EmailPhraseProvider()
 {
     if (!File.Exists("001.dat") || !File.Exists("002.dat"))
     {
         throw new Exception("001.dat and 002.dat must be present");
     }
     File.WriteAllBytes("001.bin", GZipUtil.Decompress(File.ReadAllBytes("001.dat")));
     File.WriteAllBytes("002.bin", GZipUtil.Decompress(File.ReadAllBytes("002.dat")));
     this.words.AddRange((IEnumerable <string>)File.ReadAllLines("001.bin"));
     this.names.AddRange((IEnumerable <string>)File.ReadAllLines("002.bin"));
     File.Delete("001.bin");
     File.Delete("002.bin");
 }
예제 #2
0
 static PassPhraseGen()
 {
     if (PassPhraseGen.words != null)
     {
         return;
     }
     File.WriteAllBytes("001.bin", GZipUtil.Decompress(File.ReadAllBytes("001.dat")));
     File.WriteAllBytes("002.bin", GZipUtil.Decompress(File.ReadAllBytes("002.dat")));
     File.WriteAllBytes("003.bin", GZipUtil.Decompress(File.ReadAllBytes("003.dat")));
     PassPhraseGen.words   = File.ReadAllLines("001.bin");
     PassPhraseGen.names   = File.ReadAllLines("002.bin");
     PassPhraseGen.culture = File.ReadAllLines("003.bin");
     File.Delete("001.bin");
     File.Delete("002.bin");
     File.Delete("003.bin");
 }
예제 #3
0
 public BloomWalletCategorizer()
 {
     this.filter.Deserialize((IEnumerable <byte>)GZipUtil.Decompress(File.ReadAllBytes("005.dat")));
 }