nupp.codec.hex
Hexadecimal byte encoding. Encoders emit lowercase; decoders accept either case.
Module contents
Functions
| Function | Kind | Description |
|---|
decode | function | Decodes hexadecimal without whitespace or a prefix. |
encode | function | Encodes raw bytes as lowercase hexadecimal. |
Functions
decodefunction
function decode(text: string): string?, string?
Decodes hexadecimal without whitespace or a prefix.
Arguments
| Name | Type | Description |
|---|
text | string | |
Returns
| Type | Description |
|---|
string? | raw bytes, or nil and a reason |
string? | |
encodefunction
function encode(bytes: string): string
Encodes raw bytes as lowercase hexadecimal.
Arguments
| Name | Type | Description |
|---|
bytes | string | |
Returns