This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert a hex string to an ArrayBuffer. | |
* | |
* @param {string} hexString - hex representation of bytes | |
* @return {ArrayBuffer} - The bytes in an ArrayBuffer. | |
*/ | |
function hexStringToArrayBuffer(hexString) { | |
// remove the leading 0x | |
hexString = hexString.replace(/^0x/, ''); | |