]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/gcrypt-util.h
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / basic / gcrypt-util.h
index 69faf08e56fd5ddab79b64a68097c24cedf9e90a..9154762fdac058afcc905867b8d5cf6191875d0f 100644 (file)
@@ -2,24 +2,11 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
 /***
-  This file is part of systemd.
-
   Copyright 2016 Zbigniew JÄ™drzejewski-Szmek
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#pragma once
+
 #include <errno.h>
 #include <stdbool.h>
 #include <stddef.h>
 #if HAVE_GCRYPT
 #include <gcrypt.h>
 
+#include "macro.h"
+
 void initialize_libgcrypt(bool secmem);
 int string_hashsum(const char *s, size_t len, int md_algorithm, char **out);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(gcry_md_hd_t, gcry_md_close);
 #endif
 
 static inline int string_hashsum_sha224(const char *s, size_t len, char **out) {