help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Let us see how to encrypt with Emacs?


From: tomas
Subject: Re: Let us see how to encrypt with Emacs?
Date: Fri, 9 Jul 2021 14:43:14 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jul 09, 2021 at 03:35:21PM +0300, Jean Louis wrote:
> * tomas@tuxteam.de <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

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]