public void DifferentIncrementKeyTest() { KeyByte key = new KeyByte(32); string str1 = key.GetKey(); string str2 = key.GetKey(); Assert.AreNotEqual(str1, str2); }
public void SizeKeyTest() { KeyByte key = new KeyByte(32); string str = key.GetKey(); Assert.AreEqual(4, str.Length); }
static void Main(string[] args) { KeyGenerator.KeyByte keygen = new KeyByte(32); while (keygen.nextKeyExist()) { Console.WriteLine(keygen.GetKey()); } Console.ReadLine(); }
private void DecryptProcess(string filestr, string namefile) { KeyByte keygen = new KeyByte(48); JMSReference.WebServiceAnalysis obj = new JMSReference.WebServiceAnalysis(); numberTotalKey += keygen.getAmountMaxKey(); string nameFile = namefile; while (keygen.nextKeyExist() && Thread.CurrentThread.IsAlive) { keyGenerated++; string key = keygen.GetKey(); string decryptedFile = XORdecrypt(filestr, key); //string decryptedFile = XORdecrypt(filestr, "fjuiop"); string contentReadyTosend = ChaineToBinaire(decryptedFile).ToString(); obj.rechercheDocumentDecrypte(username, contentReadyTosend, namefile, key); } }