Commit d0872638 authored by Paul Eggert's avatar Paul Eggert

* test/src/fns-tests.el (test-secure-hash): Test getrandom format.

parent 66501445
Pipeline #5964 passed with stage
in 78 minutes and 15 seconds
......@@ -890,6 +890,8 @@
(should (equal (secure-hash 'sha512 "foobar")
(concat "0a50261ebd1a390fed2bf326f2673c145582a6342d5"
(provide 'fns-tests)
;; Test that a call to getrandom returns the right format.
;; This does not test randomness; it's merely a format check.
(should (string-match "\\`[0-9a-f]\\{128\\}\\'"
(secure-hash 'sha512 'iv-auto 100))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment