open static fun fromHexStringStrict(str: CharSequence): Bytes32
(source)
Parse a hexadecimal string into a Bytes32.
This method is extra strict in that str
must of an even length and the provided representation must have exactly 32 bytes.
str
- The hexadecimal string to parse, which may or may not start with "0x".
IllegalArgumentException
- if str
does not correspond to a valid hexadecimal representation, is of an odd length or does not contain exactly 32 bytes.
Return
The value corresponding to str
.