Welcome to little lamb

Code » limb » master » tree

[master] / src / liblimb / hasher.h / hashers.c

/* This file is part of limb                           https://lila.oss/limb
 * Copyright (C) 2023 Olivier Brunel                          jjk@jjacky.com */
/* SPDX-License-Identifier: GPL-2.0-only */
#include <limb/hasher.h>
#include <limb/hasher_sha1.h>
#include <limb/hasher_sha256.h>
#include <limb/hasher_sha512.h>
#include <limb/hasher_sha3_224.h>
#include <limb/hasher_sha3_256.h>
#include <limb/hasher_sha3_384.h>
#include <limb/hasher_sha3_512.h>
#include <limb/hasher_blake3.h>

/* XXX make sure to preserve order as ALGO_* in hasher.h */
const char * const algos[NB_ALGOS + 1] = { "sha1", "sha256", "sha512", "sha3-224",
    "sha3-256", "sha3-384", "sha3-512", "blake3", 0 };

hasher * const hashers[NB_ALGOS] = { sha1, sha256, sha512, sha3_224,
    sha3_256, sha3_384, sha3_512, blake3 };