From: Clinton Bunch <cdb_zsh@zentaur.org>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Nulls in scalar parameters
Date: Thu, 20 Oct 2022 23:50:53 -0500 [thread overview]
Message-ID: <cc0b034e-056d-3da6-e69b-55b447a6c235@zentaur.org> (raw)
I'm working on a zsh/random module and I'm creating a builtin that
returns a user-specified number of random bytes and either prints it or
returns it in a parameter. There exists a small possibility of embedded
nulls in the output, and I'm not sure how to handle setting such a value
in a parameter.
One solution is to make it return a hex string, but I'm not sure of the
utility of such a result.
Metafy looks like it would handle the null problem, but I'm not sure
what else it does nor how that would play out if printed to a file.
P.S. to be clear, this module would return random data drawn from the
kernel's entropy pool, rather than a predictable pseudo-random generator
like rand or erand48
next reply other threads:[~2022-10-21 4:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 4:50 Clinton Bunch [this message]
2022-10-21 10:33 ` Roman Perepelitsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc0b034e-056d-3da6-e69b-55b447a6c235@zentaur.org \
--to=cdb_zsh@zentaur.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).