/* GNU Guix --- Functional package management for GNU Copyright (C) 2012, 2013 Ludovic Courtès This file is part of GNU Guix. GNU Guix is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. GNU Guix 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 General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Guix. If not, see . */ /* An OpenSSL-like interface to GNU libgcrypt cryptographic hash functions. */ #pragma once #include #include struct guix_hash_context { /* This copy constructor is needed in 'HashSink::currentHash()' where we expect the copy of a 'Ctx' object to yield a truly different context. */ guix_hash_context (guix_hash_context &ref) { if (ref.md_handle == NULL) md_handle = NULL; else gcry_md_copy (&md_handle, ref.md_handle); } /* Make sure 'md_handle' is always initialized. */ guix_hash_context (): md_handle (NULL) { }; gcry_md_hd_t md_handle; }; extern "C" { extern void guix_hash_init (struct guix_hash_context *ctx, int algo); extern void guix_hash_update (struct guix_hash_context *ctx, const void *buffer, size_t len); extern void guix_hash_final (void *resbuf, struct guix_hash_context *ctx, int algo); } alue='e3740109236daaa73331e6d8077d7eaa0face97e'/>
Age<
2018-12-16daemon: Use unbranded phrases in comments and messages....Ludovic Courtès
2018-10-02daemon: Remove "case hack" for nars.2017-11
2017-08-18nix: Remove unused function....Andy W
2016-05-31daemon: Remove unused XML output code....Ludovic Courtès
2015-12-02daemon: Fix namespace issue.Eelco Dolstra
2015-12-02daemon: Support SHA-512 hashes....Eelco Dolstra
2015-12-02daemon: int2String -> std::to_string.Eelco Dolstra
2015-07-03Merge branch 'nix'....Ludovic Courtès
2015-06-03Merge branch 'nix'....Ludovic Courtès
2015-05-19Merge branch 'nix'....Ludovic Courtès
2015-05-19Revert "daemon: Fix possible use-after-free."...Ludovic Courtès
2015-05-11daemon: Fix possible use-after-free....Ludovic Courtès
2015-01-04Merge commit a1dd396cc02922372314c35c8035a38bfeea08df of branch 'nix'.Ludovic Courtès
2014-12-19Merge branch 'nix' into 'master'.Ludovic Courtès
2013-12-19daemon: Fix 'HashSink::currentHash()'....Ludovic Courtès
2013-09-12daemon: Use 'int' instead of the internal 'gcry_md_algo_t' type....Ludovic Courtès
2013-01-06Update license headers....Ludovic Courtès
2012-12-04daemon: Fix typo in libgcrypt bindings....Ludovic Courtès
2012-12-03build: Include a copy of Nix's libstore and daemon; build it....Ludovic Courtès