mirror of https://github.com/zcash/zips.git
Protocol spec: \hexints and \hexarray macros.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
9d7f700c35
commit
161c9d05f8
|
@ -1203,6 +1203,14 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg
|
||||||
\newcommand{\maybe}[1]{{#1} \union \setof{\bot}}
|
\newcommand{\maybe}[1]{{#1} \union \setof{\bot}}
|
||||||
\newcommand{\Of}[1]{\!\left({#1}\right)\!}
|
\newcommand{\Of}[1]{\!\left({#1}\right)\!}
|
||||||
|
|
||||||
|
% <https://tex.stackexchange.com/a/87423/78411>
|
||||||
|
\newcommand{\hexints}[1]{
|
||||||
|
\def\nextitem{\def\nextitem{, }}
|
||||||
|
\renewcommand*{\do}[1]{\nextitem\hexint{##1}}
|
||||||
|
\docsvlist{#1}
|
||||||
|
}
|
||||||
|
\newcommand{\hexarray}[1]{[\,\hexints{#1}\,]}
|
||||||
|
|
||||||
|
|
||||||
% Hashes
|
% Hashes
|
||||||
|
|
||||||
|
@ -2451,7 +2459,7 @@ digits means the corresponding integer converted from hexadecimal.
|
||||||
|
|
||||||
$\ascii{...}$ means the given string represented as a
|
$\ascii{...}$ means the given string represented as a
|
||||||
sequence of bytes in US-ASCII. For example, $\ascii{abc}$ represents the
|
sequence of bytes in US-ASCII. For example, $\ascii{abc}$ represents the
|
||||||
byte sequence $[\hexint{61}, \hexint{62}, \hexint{63}]$.
|
byte sequence $\hexarray{61,62,63}$.
|
||||||
|
|
||||||
$\zeros{\ell}$ means the sequence of $\ell$ zero bits.
|
$\zeros{\ell}$ means the sequence of $\ell$ zero bits.
|
||||||
\notsprout{$\ones{\ell}$ means the sequence of $\ell$ one bits.}
|
\notsprout{$\ones{\ell}$ means the sequence of $\ell$ one bits.}
|
||||||
|
|
Loading…
Reference in New Issue