On Fri, Jul 09, 2021 at 03:35:21PM +0300, Jean Louis wrote: > * tomas@tuxteam.de [2021-07-09 14:53]: [...] > > - see the `ceiling' function [...] > Thanks, now I know for that: > > (defun pad-to-multiple-bytes (string length) > "Return string padded to multiple of MAX bytes." > (let* ((bytes (string-bytes string)) > (multiple (* (ceiling bytes length) length))) > (string-pad string multiple))) > > > I'm not sure you want to encrypt a zero bytes string at all, but > > this might get philosophical) > > There may be problems which I will never encounter practically. I know. :-) > > > MAX is an unfortunate variable name for that. > > Now is length. Not yet in the comment, though ;-) Cheers - t