Beispiel #1
0
	void get_certificate_hash(void* buf, size_t buflen, cryptoplus::x509::certificate cert)
	{
		cryptoplus::hash::message_digest_context mdctx;
		mdctx.initialize(cryptoplus::hash::message_digest_algorithm(CERTIFICATE_DIGEST_ALGORITHM));
		mdctx.update(cert.write_der());
		mdctx.finalize(buf, buflen);
	}
Beispiel #2
0
	void get_certificate_hash(void* buf, size_t buflen, cryptoplus::x509::certificate cert)
	{
		assert(!!buf);
		assert(!!cert);

		cryptoplus::hash::message_digest_context mdctx;
		mdctx.initialize(get_default_digest_algorithm());
		mdctx.update(cert.write_der());
		mdctx.finalize(buf, buflen);
	}