Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
juerg committed Dec 7, 2023
1 parent ef6d0df commit 633274d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions doc/examples/scripts/aes-speed.venice
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@

;;;; Compares AES-256 encryption/decryption speed

;; MacBookAir M2 2022
;; ----------------------------------------------------------------
;; 2KB 20KB 200KB 2MB 20MB 200MB
;; ----------------------------------------------------------------
;; Encrypt AES CBC: 88ms 64ms 65ms 75ms 168ms 1134ms
;; Decrypt AES CBC: 66ms 65ms 65ms 76ms 162ms 1041ms
;; Encrypt AES GCM: 66ms 64ms 66ms 77ms 166ms 1192ms
;; Decrypt AES GCM: 76ms 65ms 66ms 76ms 164ms 1052ms
;; Encrypt ZIP: 9ms 5ms 10ms 61ms 571ms 5702ms
;; Decrypt ZIP: 8ms 10ms 6ms 25ms 202ms 1998ms
;; ----------------------------------------------------------------
;; MacBookAir M2 2022
;; --------------------------------------------------------------------
;; 2KB 20KB 200KB 2MB 20MB 200MB
;; --------------------------------------------------------------------
;; Encrypt AES-256 CBC: 88ms 64ms 65ms 75ms 168ms 1134ms
;; Decrypt AES-256 CBC: 66ms 65ms 65ms 76ms 162ms 1041ms
;; Encrypt AES-256 GCM: 66ms 64ms 66ms 77ms 166ms 1192ms
;; Decrypt AES-256 GCM: 76ms 65ms 66ms 76ms 164ms 1052ms
;; Encrypt AES-256 ZIP: 9ms 5ms 10ms 61ms 571ms 5702ms
;; Decrypt AES-256 ZIP: 8ms 10ms 6ms 25ms 202ms 1998ms
;; --------------------------------------------------------------------



Expand Down Expand Up @@ -125,13 +125,13 @@
passwd
(io/file-name aes-file-unzip)
data-file)))]
(printel "Encrypt ZIP:" t))
(printel "Encrypt AES ZIP:" t))

(let [t (timing/elapsed (fn [] (decrypt-zip aes-file-zip
passwd
(io/file-name aes-file-unzip)
(io/file-parent aes-file-unzip))))]
(printel "Decrypt ZIP:" t))
(printel "Decrypt AES ZIP:" t))

(println)
(println "Decrypt verify AES CBC: "
Expand Down

0 comments on commit 633274d

Please sign in to comment.