: generate-token ( Int -- String )
    crypto.random-bytes
;

: generate-uuid ( -- String )
    crypto.uuid4
;

: test-random ( -- )
    16 generate-token
    32 string.length test.assert-eq

    32 generate-token
    64 string.length test.assert-eq

    16 generate-token
    16 generate-token
    = not test.assert

    generate-uuid
    36 string.length test.assert-eq

    generate-uuid
    generate-uuid
    = not test.assert
;
