View Source NostrBasics.HexBinary (NostrBasics v0.0.5)
A way to represent binaries in a human readable format that fits what's found on the web related to keys and addresses
Example:
<<0x181DCB172F5B56DB39B6C8544068FEE69928556230B41E115BDB22BF82A06FF3::256>>
instead of
<<24, 29, 203, 23, 47, 91, 86, 219, 57, 182, 200, 84, 64, 104, 254, 230, 153, 40, 85, 98, 48, 180, 30, 17, 91, 219, 34, 191, 130, 160, 111, 243>>
Link to this section Summary
Functions
Converts a binary string into a %HexBinary{} that the inspector will print in a compact way
Link to this section Functions
Converts a binary string into a %HexBinary{} that the inspector will print in a compact way
examples
Examples
iex> <<24, 29, 203, 23, 47, 91, 86, 219, 57, 182, 200, 84, 64, 104, 254, 230, 153, 40, 85, 98, 48, 180, 30, 17, 91, 219, 34, 191, 130, 160, 111, 243>>
...> |> NostrBasics.HexBinary.from_binary()
%HexBinary{data: <<0x181DCB172F5B56DB39B6C8544068FEE69928556230B41E115BDB22BF82A06FF3::256>>}