code: function ArrayBuffertohex(buffer) {
      var hex = "";
      var view = new DataView(buffer);
  
      for (var i = 0; i < buffer.byteLength; i++) {
  	hex += ("00" + view.getUint8(i).toString(16)).slice(-2);
      }
  
      return hex;
  }
docs: ==== ArrayBuffer / hex ================================= 
  convert an ArrayBuffer to a hexadecimal string<br/>
  @name ArrayBuffertohex
  @function
  @param {ArrayBuffer} buffer ArrayBuffer
  @return {String} hexadecimal string
  @since jsrsasign 6.1.4 base64x 1.1.8
  @description
  This function converts from an ArrayBuffer to a hexadecimal string.
  @example
  var buffer = new ArrayBuffer(3);
  var view = new DataView(buffer);
  view.setUint8(0, 0xfa);
  view.setUint8(1, 0xfb);
  view.setUint8(2, 0x01);
  ArrayBuffertohex(buffer) &rarr; "fafb01"