sodium_bin2hex

Hexadecimal encoding. The sodium_bin2hex() function converts the bytes stored at bin into a hexadecimal string.

It evaluates in constant time for a given size. hex will receive a terminating null character

  1. alias sodium_bin2hex = deimos.sodium.utils.sodium_bin2hex
  2. void sodium_bin2hex(char[] hex, ubyte[] bin)
    pragma(inline, true) @nogc @trusted
    void
    sodium_bin2hex
    (
    scope char[] hex
    ,
    scope const ubyte[] bin
    )

Throws

NoGcException, if hex.length != 2*bin.length+1 or bin.length >= size_t.max/2

See Also

Meta