code: function sha256(data) {
      if (!data.byteLength) {
          return Promise.resolve(ByteUtils.arrayToBuffer(ByteUtils.hexToBytes(EmptySha256)));
      }
      if (subtle) {
          return subtle.digest({ name: 'SHA-256' }, data);
      } else if (nodeCrypto) {
          return new Promise(function(resolve) {
              var sha = nodeCrypto.createHash('sha256');
              var hash = sha.update(Buffer.from(data)).digest();
              resolve(hash.buffer);
          });
      } else {
          return Promise.reject(new KdbxError(Consts.ErrorCodes.NotImplemented, 'SHA256 not implemented'));
      }
  }
docs: SHA-256 hash
  @param {ArrayBuffer} data
  @returns {Promise.<ArrayBuffer>}