[英]Can anyone explain how to calculate the execution time of encryption and decryption of a cipher?
我試圖在多元平方密碼中使用時間函數但它不起作用,有沒有其他方法可以計算密碼的加密和解密時間? 或者它有任何其他公式嗎?請幫助我解決這個問題..我想知道具有任何隨機字符串長度的 polybious square 和 vignere 密碼的加密和解密時間..
謝謝你
import time
start = time.time()
encrypt_func()
encrypt_duration = time.time() - start
decrypt_func()
decrypt_duration = time.time() - encrypt_duration
print("Encryption took", encrypt_duration, "milliseconds")
print("Decryption took", decrypt_duration, "milliseconds")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.