Files
libguestfs/builder/checksums.mli
Pino Toscano 63175fb3c3 builder: internally use a list of checksums for indexes
Extend Index_parser.entry to hold a list of checksums to validate, and
validate all of them.

This does change nothing currently, as only sha512 is read, while still
allowing us to fetch more checksums if needed.
2015-07-28 13:30:39 +02:00

34 lines
1.2 KiB
OCaml

(* virt-builder
* Copyright (C) 2015 Red Hat Inc.
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
type csum_t =
| SHA256 of string
| SHA512 of string
val verify_checksum : csum_t -> string -> unit
(** Verify the checksum of the file. *)
val verify_checksums : csum_t list -> string -> unit
(** Verify all the checksums of the file. *)
val string_of_csum_t : csum_t -> string
(** Return a string representation of the checksum type. *)
val string_of_csum : csum_t -> string
(** Return a string representation of the checksum value. *)