Sfoglia il codice sorgente

fixed decrytion test for ARC4 cipher

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7600 8c9fc860-2736-0410-a75d-ab315db34111
eth.guenter 7 anni fa
parent
commit
df527d5a67
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      source/CryptoTestCiphers.Mod

+ 1 - 0
source/CryptoTestCiphers.Mod

@@ -24,6 +24,7 @@ IMPORT
 		cipher.Encrypt( bindata, 0, cipher.blockSize );
 		Out.Ln; Out.String( "Encrypted: " ); U.PrintHex( bindata, 0, cipher.blockSize );
 		(* decryption *)
+		cipher.InitKey( binkey, keybits );
 		cipher.Decrypt( bindata, 0, cipher.blockSize );
 		Out.Ln; Out.String( "Decrypted: " ); U.PrintHex( bindata, 0, cipher.blockSize );
 		bindata[cipher.blockSize] := 0X;