Base64 encode a string.
Function:
(defun base64-encode (x) (declare (xargs :guard (stringp x))) (declare (type string x)) (let ((acl2::__function__ 'base64-encode)) (declare (ignorable acl2::__function__)) (mbe :logic (implode (base64-encode-list (explode x))) :exec (rchars-to-string (b64-encode-str-impl x 0 (length x) nil)))))
Theorem:
(defthm stringp-of-base64-encode (b* ((encoded (base64-encode x))) (stringp encoded)) :rule-classes :type-prescription)