//działa public void KeyGeneratorTest() { TwoFish tf = new TwoFish(); BitArray bytes = TwoFish.ConvertHexToBitArray("000102030405060708090A0B0C0D0E0F"); //tf.DebugBits(TwoFish.ConvertHexToBitArray("14D")); //tf.ConvertToHex(tf.ConvertTo8bitArray(tf.getIntFromBitArrayInv(tf.GMulRS(TwoFish.ConvertHexToBitArray("0B"), TwoFish.ConvertHexToBitArray("F3"))))); tf.SKeyGenerator(bytes); }
public bool SKeyTest() { bool done = true; TwoFish tf = new TwoFish(); BitArray bytes = TwoFish.ConvertHexToBitArray("000102030405060708090A0B0C0D0E0F"); BitArray[] wynik = tf.SKeyGenerator(bytes); //Debug.Log(tf.ConvertToHex(wynik[0])); //Debug.Log(tf.ConvertToHex(wynik[1])); if (tf.ConvertToHex(wynik[0]) != "2f062ad7" | tf.ConvertToHex(wynik[1]) != "f204791a") { done = false; } return(done); }