1b2654064SBaptiste Daroussin /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3b2654064SBaptiste Daroussin * 4b2654064SBaptiste Daroussin * Copyright (c) 2023 Baptiste Daroussin <bapt@FreeBSD.org> 5b2654064SBaptiste Daroussin * 6b2654064SBaptiste Daroussin * Redistribution and use in source and binary forms, with or without 7b2654064SBaptiste Daroussin * modification, are permitted provided that the following conditions 8b2654064SBaptiste Daroussin * are met: 9b2654064SBaptiste Daroussin * 1. Redistributions of source code must retain the above copyright 10b2654064SBaptiste Daroussin * notice, this list of conditions and the following disclaimer. 11b2654064SBaptiste Daroussin * 2. Redistributions in binary form must reproduce the above copyright 12b2654064SBaptiste Daroussin * notice, this list of conditions and the following disclaimer in the 13b2654064SBaptiste Daroussin * documentation and/or other materials provided with the distribution. 14b2654064SBaptiste Daroussin * 15b2654064SBaptiste Daroussin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16b2654064SBaptiste Daroussin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17b2654064SBaptiste Daroussin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18b2654064SBaptiste Daroussin * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19b2654064SBaptiste Daroussin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20b2654064SBaptiste Daroussin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21b2654064SBaptiste Daroussin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22b2654064SBaptiste Daroussin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23b2654064SBaptiste Daroussin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24b2654064SBaptiste Daroussin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25b2654064SBaptiste Daroussin * SUCH DAMAGE. 26b2654064SBaptiste Daroussin * 27b2654064SBaptiste Daroussin */ 28b2654064SBaptiste Daroussin 29b2654064SBaptiste Daroussin #pragma once 30b2654064SBaptiste Daroussin 31e5dd5bfaSBaptiste Daroussin char *sha256_buf(char *buf, size_t len); 32e5dd5bfaSBaptiste Daroussin char *sha256_fd(int fd); 33