from_hex_string
- Transforms a string that consists of hexadecimal characters to its binary representation. The string should be of even length and should contain only hexadecimal characters in it. Every pair of characters form a single byte in a binary result.
Edit
fields | type | description |
---|---|---|
data | string | Target data to transform. Should contain hexadecimal symbols only and be of even length. |
Edit
type | description |
---|---|
string | A binary representation of an input string |
Edit
message | description |
---|---|
input data size is more than 1000000 bytes | Limits input size up to 1 million bytes |
input data couldn’t be transformed to binary | Input data contains invalid data to convert to a binary representation. It can be not of even length, contain inappropriate symbols. |
Edit
local security = require("security")
local hash = security.sha256( 'Some human-readable string' )
local binary_hash = security.from_hex_string( hash )