Base64 encode a character list.
(base64-encode-list x) → x-enc
Function:
(defun base64-encode-list (x) (declare (xargs :guard (character-listp x))) (let ((acl2::__function__ 'base64-encode-list)) (declare (ignorable acl2::__function__)) (mbe :logic (b* (((when (atom x)) nil) ((when (atom (cdddr x))) (b* (((mv c1 c2 c3 c4) (b64-encode-last-group x))) (list c1 c2 c3 c4))) ((mv c1 c2 c3 c4) (b64-enc3 (first x) (second x) (third x)))) (append (list c1 c2 c3 c4) (base64-encode-list (cdddr x)))) :exec (reverse (b64-encode-list-impl x nil)))))
Theorem:
(defthm character-listp-of-base64-encode-list (b* ((x-enc (base64-encode-list x))) (character-listp x-enc)) :rule-classes :rewrite)
Theorem:
(defthm b64-encode-list-impl-removal (equal (b64-encode-list-impl x acc) (revappend (base64-encode-list x) acc)))