code: private function validateAllKeysArePresent($result)
      {
          // Regexp in pair() ensures no unwanted keys exist.
          // Ensure that all wanted keys exist.
          $wanted = ['keyId', 'algorithm', 'headers', 'signature'];
          $missing = array_diff($wanted, array_keys($result));
          if (!empty($missing)) {
              $csv = implode(', ', $missing);
              throw new SignatureParseException("Missing keys $csv");
          }
      }
docs: @param $result
  
  @throws SignatureParseException