• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
      • Std/lists
      • Omaps
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
        • Printtree
        • Base64
          • Base64-impl
            • B64-bytes-from-vals
            • B64-vals-from-bytes
            • B64-dec3
            • B64-decode-str-impl
            • B64-dec2
            • B64-encode-last-group
            • B64-value-from-code
            • B64-enc3
            • B64-enc2
            • B64-decode-last-group
            • B64-dec1
            • B64-decode-list-impl
            • B64-encode-str-impl
            • B64-encode-last-group-str
            • B64-enc1
            • B64-char-from-value
              • *b64-chars-from-vals-array*
              • B64-encode-list-impl
            • Base64-decode-list
            • Base64-decode
            • Base64-encode-list
            • Base64-revappend-decode
            • Base64-revappend-encode
            • Base64-encode
          • Charset-p
          • Strtok!
          • Cases
          • Concatenation
          • Character-kinds
          • Html-encoding
          • Substrings
          • Strtok
          • Equivalences
          • Url-encoding
          • Lines
          • Explode-implode-equalities
          • Ordering
          • Numbers
          • Pad-trim
          • Coercion
          • Std/strings/digit-to-char
          • Substitution
          • Symbols
        • Std/osets
        • Std/io
        • Std/basic
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • B64-char-from-value

    *b64-chars-from-vals-array*

    Array mapping each value to its associated character.

    This array is the main lookup table used for encoding. It corresponds to Table 1 from RFC 4648.

    Definition: *b64-chars-from-vals-alist*

    (defconst *b64-chars-from-vals-alist*
      '((0 . #\A)
        (1 . #\B)
        (2 . #\C)
        (3 . #\D)
        (4 . #\E)
        (5 . #\F)
        (6 . #\G)
        (7 . #\H)
        (8 . #\I)
        (9 . #\J)
        (10 . #\K)
        (11 . #\L)
        (12 . #\M)
        (13 . #\N)
        (14 . #\O)
        (15 . #\P)
        (16 . #\Q)
        (17 . #\R)
        (18 . #\S)
        (19 . #\T)
        (20 . #\U)
        (21 . #\V)
        (22 . #\W)
        (23 . #\X)
        (24 . #\Y)
        (25 . #\Z)
        (26 . #\a)
        (27 . #\b)
        (28 . #\c)
        (29 . #\d)
        (30 . #\e)
        (31 . #\f)
        (32 . #\g)
        (33 . #\h)
        (34 . #\i)
        (35 . #\j)
        (36 . #\k)
        (37 . #\l)
        (38 . #\m)
        (39 . #\n)
        (40 . #\o)
        (41 . #\p)
        (42 . #\q)
        (43 . #\r)
        (44 . #\s)
        (45 . #\t)
        (46 . #\u)
        (47 . #\v)
        (48 . #\w)
        (49 . #\x)
        (50 . #\y)
        (51 . #\z)
        (52 . #\0)
        (53 . #\1)
        (54 . #\2)
        (55 . #\3)
        (56 . #\4)
        (57 . #\5)
        (58 . #\6)
        (59 . #\7)
        (60 . #\8)
        (61 . #\9)
        (62 . #\+)
        (63 . #\/)))

    Definition: *b64-chars-from-vals-array*

    (defconst *b64-chars-from-vals-array*
      (compress1 '*b64-chars-from-vals-array*
                 (cons (list :header
                             :dimensions (list 64)
                             :maximum-length 65
                             :default #\0
                             :name '*b64-chars-from-vals-array*)
                       *b64-chars-from-vals-alist*)))