hex-string ( seq -- str )
Factor documentation > Factor handbook > Input and output > Checksums
Prev:checksum-file ( path checksum -- value )
Next:CRC32 checksum


Vocabulary
checksums

Inputs and outputs
seqa sequence
stra string


Word description
Converts a sequence of values from 0-255 to a string of hex numbers from 0-ff.

Examples
USING: checksums io ; B{ 1 2 3 4 } hex-string print
01020304


Notes
Numbers are zero-padded on the left.

Definition
USING: math.parser sequences ;

IN: checksums

: hex-string ( seq -- str )
[ >hex 2 48 pad-head ] { } map-as concat ;