CBORByteUtils
CBORByteUtils
Helpful byte utility functions.
sliceBytesMemory
function sliceBytesMemory(bytes data, uint256 start, uint256 end) internal view returns (bytes slicedData)
Slices a dynamic bytes object from start:end (non-inclusive end)
| Name | Type | Description |
|---|---|---|
| data | bytes | |
| start | uint256 | position to start byte slice (inclusive) |
| end | uint256 | position to end byte slice (non-inclusive) |
| Name | Type | Description |
|---|---|---|
| slicedData | bytes | dynamic sliced bytes object |
bytesToUint256
function bytesToUint256(bytes data) internal view returns (uint256 value)
Converts a dynamic bytes array to a uint256
| Name | Type | Description |
|---|---|---|
| data | bytes | dynamic bytes array |
| Name | Type | Description |
|---|---|---|
| value | uint256 | calculated uint256 value |