lib/browser-adapters.js
function ab2hex(ab) {
      var dv = new DataView(ab)
        , i
        , len
        , hex = ''
        , c
        ;

      for (i = 0, len = dv.byteLength; i < len; i += 1) {
        c = dv.getUint8(i).toString(16);

        if (c.length < 2) {
          c = '0' + c;
        }

        hex += c;
      }

      return hex;
    }
function ab2hex(ab) {
      var dv = new DataView(ab)
        , i
        , len
        , hex = ''
        , c
        ;

      for (i = 0, len = dv.byteLength; i < len; i += 1) {
        c = dv.getUint8(i).toString(16);

        if (c.length < 2) {
          c = '0' + c;
        }

        hex += c;
      }

      return hex;
    }
function ab2hex ( ab ) { var dv = new DataView ( ab ) , i , len , hex = '' , c ; for ( i = 0 , len = dv . byteLength ; i < len ; i += 1 ) { c = dv . getUint8 ( i ) . toString ( 16 ) ; if ( c . length < 2 ) { c = '0' + c ; } hex += c ; } return hex ; }
convert from arraybuffer to hex
convert from arraybuffer to hex