static bool matches(const XSECCryptoKey& key1, const XSECCryptoKey& key2);
/**
+ * Performs a hash operation over the supplied data.
+ *
+ * @param hashAlg name of hash algorithm, syntax specific to crypto provider
+ * @param buf input data to hash
+ * @param buflen length of input data
+ * @param toHex if true, hex-encodes the resulting raw bytes
+ * @return result of hash operation, or an empty string
+ */
+ static std::string doHash(const char* hashAlg, const char* buf, unsigned long buflen, bool toHex=true);
+
+ /**
* Returns the base64-encoded DER encoding of a public key in SubjectPublicKeyInfo format.
* <p>If a hash algorithm is provided, the data is digested before being base64-encoded.
*