Coverage report: /home/ellis/comp/ext/ironclad/src/aead/aead.lisp
Kind | Covered | All | % |
expression | 0 | 53 | 0.0 |
branch | 0 | 6 | 0.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;;; aead.lisp -- authenticated encryption with associated data
5
((encryption-started :accessor encryption-started-p
10
(defmethod shared-initialize :after ((mode aead-mode) slot-names &rest initargs &key tag &allow-other-keys)
11
(declare (ignore slot-names initargs))
12
(setf (encryption-started-p mode) nil
13
(tag mode) (copy-seq tag))
19
(defun list-all-authenticated-encryption-modes ()
20
"Returns a list whose elements may be validly passed to
21
make-authenticated-encryption-mode."
22
(loop for symbol being each external-symbol of (find-package :ironclad)
24
collect (intern (symbol-name symbol) :keyword) into ciphers
25
finally (return (sort ciphers #'string<))))
27
(defun authenticated-encryption-mode-supported-p (name)
28
"Returns T if NAME would be in the list returned by
29
list-all-authenticated-encryption-modes NIL otherwise."
30
(and (symbolp name) (aeadp (massage-symbol name))))
32
(defmacro defaead (name)
33
`(setf (get ',name 'aead) t))
35
(defun make-authenticated-encryption-mode (name &rest args)
36
"Return an authenticated encryption object suitable for use for both
37
encryption and decryption."
40
(let ((name (massage-symbol name)))
42
(apply #'make-instance name args)
43
(error 'unsupported-authenticated-encryption-mode :name name))))
45
(error 'type-error :datum name :expected-type 'symbol))))