code: function setProtectedValues(node, protectSaltGenerator) {
      traverse(node, function(node) {
          if (strToBoolean(node.getAttribute(XmlNames.Attr.Protected))) {
              try {
                  var value = ByteUtils.arrayToBuffer(ByteUtils.base64ToBytes(node.textContent));
                  if (value.byteLength) {
                      var salt = protectSaltGenerator.getSalt(value.byteLength);
                      node.protectedValue = new ProtectedValue(value, salt);
                  }
              } catch (e) {
                  throw new KdbxError(Consts.ErrorCodes.FileCorrupt, 'bad protected value at line ' +
                  node.lineNumber + ': ' + e);
              }
          }
      });
  }
docs: Reads protected values for all nodes in tree
  @param {Node} node
  @param {ProtectSaltGenerator} protectSaltGenerator