Moving the new sodium crypto code to a separate file

10 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Aug 11, 2021, 12:49:39 AM8/11/21
to Christian Brabandt, vim_dev
Hi,

The new sodium crypto related code is in the crypt.c file.
But the blowfish code is in the blowfish.c file and the zip
code is in the crypt_zip.c file. To be consistent, the sodium
related code should be moved to the crypt_sodium.c file?

Regards,
Yegappan

Christian Brabandt

unread,
Aug 11, 2021, 3:17:30 AM8/11/21
to vim_dev
I don't mind either way. I just kept it in crypt.c because there are
only a couple of wrapper functions around the actual sodium code.

Best,
Christian
--
Wie glücklich viele Menschen wären, wenn sie sich genausowenig um die
Angelegenheiten anderer kümmern würden wie um die eigenen.
-- Georg Christoph Lichtenberg

Bram Moolenaar

unread,
Aug 11, 2021, 5:26:24 AM8/11/21
to vim...@googlegroups.com, Christian Brabandt

Christian wrote:

> On Di, 10 Aug 2021, Yegappan Lakshmanan wrote:
>
> > The new sodium crypto related code is in the crypt.c file.
> > But the blowfish code is in the blowfish.c file and the zip
> > code is in the crypt_zip.c file. To be consistent, the sodium
> > related code should be moved to the crypt_sodium.c file?
>
> I don't mind either way. I just kept it in crypt.c because there are
> only a couple of wrapper functions around the actual sodium code.

The blowfish.c and crypt_zip.c files contain the implementation of the
algorithm. For Sodium we don't have the implementation. This is fine
as it is. Also, the crypt.c file is not big, thus there is no good
reason to split it.

Generally, every file to be compiled has some overhead, making
compilation slower. Especially when compiling with a GUI (GTK header
files make compilate go a lot slower for me). Thus I don't like
splitting everything into tiny files.

--
CONCORDE: Quickly, sir, come this way!
LAUNCELOT: No! It's not right for my idiom. I must escape more ... more ...
CONCORDE: Dramatically, sir?
LAUNCELOT: Dramatically.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages