void crypt_shutdown(void)
{
+#ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
CRYPTO_cleanup_all_ex_data();
+#endif
+#ifdef HAVE_OPENSSL_THREAD_STOP /* openssl-1.1 or later */
+ OPENSSL_thread_stop();
+#else /* openssl-1.0 */
+ ERR_remove_thread_state(NULL);
+#endif
+ EVP_cleanup();
}
/*
SHA1_Update(&c, data, len);
SHA1_Final(hash, &c);
}
+
+void hash2_function(const char *data, unsigned long len, unsigned char *hash)
+{
+ SHA256_CTX c;
+ SHA256_Init(&c);
+ SHA256_Update(&c, data, len);
+ SHA256_Final(hash, &c);
+}