anchor.diff:                          (char-to-digit (char string (1+ j)))))
            finally (return key)))))
   
  -(defun byte-array-to-hex-string (vector &key (start 0) end (element-type 'base-char))
  +(defun byte-array-to-hex-string (vector &aux (start 0) (end (length vector)) (element-type 'base-char))
     "Return a string containing the hexadecimal representation of the
   subsequence of VECTOR between START and END.  ELEMENT-TYPE controls
   the element-type of the returned string."
  
positive.code:                   (aref hexdigits (ldb (byte 4 0) byte))))
         finally (return string))))
  
  (defun octets-to-integer (octet-vec &key (start 0) end (big-endian t) n-bits)
    (declare (type (simple-array (unsigned-byte 8) (*)) octet-vec))
    (let ((end (or end (length octet-vec))))
      (multiple-value-bind (complete-bytes extra-bits)
          (if n-bits
              (truncate n-bits 8)
  
negative.code:                 for j from (1- end) downto start
                  sum (ash (aref octet-vec j) (* i 8)))))))
  
  (defun integer-to-octets (bignum &aux
                                     (n-bits (integer-length bignum))
                                     (big-endian t))
    (let* ((n-bytes (ceiling n-bits 8))
           (octet-vec (make-array n-bytes :element-type '(unsigned-byte 8))))
      (declare (type (simple-array (unsigned-byte 8) (*)) octet-vec))
  