@@ -29,15 +29,15 @@ public void EncryptDecryptBytesFromData()
2929 stopwatch . Start ( ) ;
3030 bool encryptResult = HT2XORPlus . EncryptBytes ( testBytes , hKey , tKey , j1Key , j2Key ) ;
3131 stopwatch . Stop ( ) ;
32- UnityEngine . Debug . Log ( $ "[EncryptDecryptBytesFromData] HT2XORPlus.EncryptBytes execution time: { stopwatch . ElapsedMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
32+ UnityEngine . Debug . Log ( $ "[EncryptDecryptBytesFromData] HT2XORPlus.EncryptBytes execution time: { stopwatch . Elapsed . TotalMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
3333 Assert . IsTrue ( encryptResult , "In-place encryption failed" ) ;
3434
3535 stopwatch . Reset ( ) ;
3636
3737 stopwatch . Start ( ) ;
3838 bool decryptResult = HT2XORPlus . DecryptBytes ( testBytes , hKey , tKey , j1Key , j2Key ) ;
3939 stopwatch . Stop ( ) ;
40- UnityEngine . Debug . Log ( $ "[EncryptDecryptBytesFromData] HT2XORPlus.DecryptBytes execution time: { stopwatch . ElapsedMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
40+ UnityEngine . Debug . Log ( $ "[EncryptDecryptBytesFromData] HT2XORPlus.DecryptBytes execution time: { stopwatch . Elapsed . TotalMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
4141 Assert . IsTrue ( decryptResult , "In-place decryption failed" ) ;
4242
4343 Assert . AreEqual ( originalBytes , testBytes , "Decrypted content does not match the original content" ) ;
@@ -56,15 +56,15 @@ public void EncryptDecryptWriteFile()
5656 stopwatch . Start ( ) ;
5757 bool encryptResult = HT2XORPlus . WriteFile . EncryptFile ( tempFile , hKey , tKey , j1Key , j2Key ) ;
5858 stopwatch . Stop ( ) ;
59- UnityEngine . Debug . Log ( $ "[EncryptDecryptWriteFile] HT2XORPlus.WriteFile.EncryptFile execution time: { stopwatch . ElapsedMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
59+ UnityEngine . Debug . Log ( $ "[EncryptDecryptWriteFile] HT2XORPlus.WriteFile.EncryptFile execution time: { stopwatch . Elapsed . TotalMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
6060 Assert . IsTrue ( encryptResult , "File encryption failed" ) ;
6161
6262 stopwatch . Reset ( ) ;
6363
6464 stopwatch . Start ( ) ;
6565 bool decryptResult = HT2XORPlus . WriteFile . DecryptFile ( tempFile , hKey , tKey , j1Key , j2Key ) ;
6666 stopwatch . Stop ( ) ;
67- UnityEngine . Debug . Log ( $ "[EncryptDecryptWriteFile] HT2XORPlus.WriteFile.DecryptFile execution time: { stopwatch . ElapsedMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
67+ UnityEngine . Debug . Log ( $ "[EncryptDecryptWriteFile] HT2XORPlus.WriteFile.DecryptFile execution time: { stopwatch . Elapsed . TotalMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
6868 Assert . IsTrue ( decryptResult , "File decryption failed" ) ;
6969
7070 byte [ ] decryptedData = File . ReadAllBytes ( tempFile ) ;
@@ -86,7 +86,7 @@ public void EncryptDecryptBytesFromFile()
8686 stopwatch . Start ( ) ;
8787 byte [ ] encryptedBytes = HT2XORPlus . EncryptBytes ( tempFile , hKey , tKey , j1Key , j2Key ) ;
8888 stopwatch . Stop ( ) ;
89- UnityEngine . Debug . Log ( $ "[EncryptDecryptBytesFromFile] HT2XORPlus.EncryptBytes execution time: { stopwatch . ElapsedMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
89+ UnityEngine . Debug . Log ( $ "[EncryptDecryptBytesFromFile] HT2XORPlus.EncryptBytes execution time: { stopwatch . Elapsed . TotalMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
9090 Assert . IsNotNull ( encryptedBytes , "Encrypted bytes returned null" ) ;
9191 Assert . IsNotEmpty ( encryptedBytes , "Encrypted bytes are empty" ) ;
9292
@@ -98,7 +98,7 @@ public void EncryptDecryptBytesFromFile()
9898 stopwatch . Start ( ) ;
9999 byte [ ] decryptedBytes = HT2XORPlus . DecryptBytes ( encryptedFile , hKey , tKey , j1Key , j2Key ) ;
100100 stopwatch . Stop ( ) ;
101- UnityEngine . Debug . Log ( $ "[EncryptDecryptBytesFromFile] HT2XORPlus.DecryptBytes execution time: { stopwatch . ElapsedMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
101+ UnityEngine . Debug . Log ( $ "[EncryptDecryptBytesFromFile] HT2XORPlus.DecryptBytes execution time: { stopwatch . Elapsed . TotalMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
102102 Assert . IsNotNull ( decryptedBytes , "Decrypted bytes returned null" ) ;
103103 Assert . AreEqual ( testData , decryptedBytes , "Decrypted content does not match the original content" ) ;
104104
@@ -132,7 +132,7 @@ public void DecryptStream()
132132 Assert . AreEqual ( testData , decryptedData , "Stream decrypted content does not match" ) ;
133133 }
134134 }
135- UnityEngine . Debug . Log ( $ "[DecryptStream] HT2XORPlus.DecryptStream execution time: { stopwatch . ElapsedMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
135+ UnityEngine . Debug . Log ( $ "[DecryptStream] HT2XORPlus.DecryptStream execution time: { stopwatch . Elapsed . TotalMilliseconds } ms, DataSize: { BundleUtility . GetBytesToString ( dataSize ) } ") ;
136136
137137 File . Delete ( tempFile ) ;
138138 }
0 commit comments