Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Nulls in scalar parameters
- X-seq: zsh-workers 50799
- From: Clinton Bunch <cdb_zsh@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Nulls in scalar parameters
- Date: Thu, 20 Oct 2022 23:50:53 -0500
- Archived-at: <https://zsh.org/workers/50799>
- List-id: <zsh-workers.zsh.org>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author